|
From: Ankit M. <ank...@gm...> - 2024-04-05 17:26:11
|
Hey Chris,
Following up on this - we are now thinking of using LoggingFilter and
manage a hash map that will store the trade execution ID as key and the
receive timestamp as its value.
Will access the same time then during the actual message translation layer
and do further calculations to get network latencies.
AspectJ load weaver option is still open and we might explore that as well.
Just running by you to see if you could share some expert advice or opine
on a better way to achieve the same.
Thanks,
Ankit
On Thu, 4 Apr 2024 at 11:42 PM, Ankit Mehta <ank...@gm...>
wrote:
> Thanks for a reply Chris.
> But I am not sure if this will solve what we were looking for.
> For example, I can think of below implementation of the LoggingFilter -
> Note: We are initiators and use SocketInitiator class for the same.
> As soon as we have initialized the SocketInitiator, it can be followed by
> below piece of code -
>
> DefaultIoFilterChainBuilder builderChain = new DefaultIoFilterChainBuilder();
>
> builderCHain.addFirst("logging", new LoggingFilter());
>
> initiator.setIoFilterChainBuilder(builderChain);
>
>
> But from what I understand - all this will do is just start logging in the
> logs, whenever a message is received.
> What we were looking for instead is to capture that time somewhere in the
> message itself, which can be later utilized for some analysis (which we do
> after doing calculations between tag 52 and this newly added field on the
> message, which at present we do inside the fromApp callback)
>
> Maybe my understanding is wrong and I am missing something from what you
> were proposing. Please correct me if that is the case.
>
> Another alternative to achieve this that we have been thinking about is to
> use AspectJ and then do load weavering to amend the message and add the new
> receive time field inside the EventStrategy class under the onMessage
> method.
> Appreciate your thoughts on this approach or if you can propose a better
> alternative for our requirement.
>
> Regards,
> Ankit
>
>
> On Thu, Apr 4, 2024 at 3:39 AM Christoph John <chr...@ma...>
> wrote:
>
>> QFJ Documentation: http://www.quickfixj.org/documentation/
>> QFJ Support: http://www.quickfixj.org/support/
>>
>>
>> Hi
>>
>> You could try to implement it as a MINA filter and add it as first filter
>> in the chain.
>>
>>
>> https://mina.apache.org/mina-project/userguide/ch5-filters/ch5-filters.html
>>
>> Have a look at e.g. the logging filter.
>>
>> The filter can then be added to your connector via
>> setIoFilterChainBuilder() on the connector.
>>
>> Hope that helps.
>>
>> Cheers
>> Chris
>>
>> _______________________________________________
>> Quickfixj-users mailing list
>> Qui...@li...
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>
|