|
From: Christoph J. <chr...@ma...> - 2021-05-26 09:18:01
|
As Nik wrote, you need to use fromAdmin.
There you need to check for Logon messages and the contained Heartbeat interval (which is a required
field). If it is greater than 30 seconds, throw RejectLogon.
On 26.05.21 11:06, Ajit Gautam wrote:
> Hi,
>
> I tried doing it as per the below methodology :
>
> public void onMessage(Exchange exchange) throws RejectLogon {
> try {
>
> if (MsgType.HEARTBEAT < 30 seconds)
> {
> throw new RejectLogon(Invalid heartbeat);
> }
> }
> catch (RejectLogon rejectLogon) {
> throw rejectLogon();
> }
> }
>
> Error - It is throwing me a field exception.
>
> Note: I am receiving all the messages here and I validate all the fields in my onMessage method.
> Let me know If I am doing something wrong.
>
> Regards
> Ajit Gautam
>
>
> On Tue, May 25, 2021 at 9:26 PM Christoph John <chr...@ma...
> <mailto:chr...@ma...>> wrote:
>
> Please read again what Nik suggested.
>
> Am 25. Mai 2021 17:40:09 MESZ schrieb Ajit Gautam <aji...@gm...
> <mailto:aji...@gm...>>:
>
> Hi,
>
> But to send a rejection, it will require an active session with the counterparty FIX
> engine. While, I was thinking not to establish session if heartbeat time is not greater
> than 30 seconds.
>
> Can you please elaborate more on this?
>
> Regards
> Ajit Gautam
>
> On Tue, May 25, 2021, 20:52 Nik Gehring <nik...@gm...
> <mailto:nik...@gm...>> wrote:
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J <http://www.quickfixj.org/documentation/QuickFIX/J> Support:
> http://www.quickfixj.org/support/ <http://www.quickfixj.org/support/>
>
>
> Ajim,
>
> the information you are looking for is shown on
> https://github.com/quickfix-j/quickfixj <https://github.com/quickfix-j/quickfixj> ...
>
> |fromAdmin| notifies you when an administrative message is sent from a
> counterparty to your FIX engine. This can be useful for doing extra validation on
> |Logon| messages such as for checking passwords. Throwing a
> |RejectLogon| exception will disconnect the counterparty.
>
>
>
> Nik
>
>
> On Tue, 25 May 2021 at 15:38, Ajit Gautam <aji...@gm...
> <mailto:aji...@gm...>> wrote:
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J <http://www.quickfixj.org/documentation/QuickFIX/J> Support:
> http://www.quickfixj.org/support/ <http://www.quickfixj.org/support/>
>
>
> Hi,
>
> I was thinking of a scenario of have customised session validation.
>
> Scenario -
> I am building an FIX Acceptor and wanted to allow only session logon with
> heartbeat time greater than 30 sec. In case of receiving a session logon from
> initiator with heartbeat time less than 30 seconds, I need to reject the logon.
> But, Quickfix establishes the session once session logon is accepted.
>
> Is there any setting configuration I use on FIX Acceptor or I need to introduce
> changes in my project code.
>
> I was thinking to send business level rejection once session logon is accepted for
> heartbeat received less than 30 seconds and then send a logout. But still, I can
> receive a logon again. Thus, I m stuck here.
>
> I will appreciate if anyone can provide suggestions on the same.
>
>
> Regards
> Ajit Gautam
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li... <mailto:Qui...@li...>
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
> <https://lists.sourceforge.net/lists/listinfo/quickfixj-users>
>
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li... <mailto:Qui...@li...>
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
> <https://lists.sourceforge.net/lists/listinfo/quickfixj-users>
>
--
Christoph John
Software Engineering
T +49 241 557080-28
chr...@ma...
MACD GmbH
Oppenhoffallee 103
52066 Aachen, Germany
www.macd.com
Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663
Geschäftsführer: George Macdonald
|