[QFJ-683] Tag 43=Y is not being sent when I set the value in getHeader() Created: 25/May/12  Updated: 15/Nov/12  Resolved: 31/May/12

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.0
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Andrew Niland Assignee: Unassigned
Resolution: Not a bug Votes: 0
Labels: QuickfixJ


 Description   

When I set the tag in the body the tag is sent in the message:
executionReport.setField(new BooleanField(43, true));

But not when I set it in the header:
executionReport.getHeader().setField(new BooleanField(43, true));

Is there a way to force header tags to be sent?



 Comments   
Comment by Jörg Thönnes [ 26/May/12 ]

Hi Andrew,

first of all you should not be able to set the header field 43/PossDup in the body of a FIX message. This is an error.

And if you set this flag in the header you are basically asking for trouble. This field is controlled by the FIX engine
which implements the FIX protocol. The field 43/PossDup is only set if a message is resent, i.e. been sent more than
one time.

What is your reason you wanto to set this field?

Cheers, Jörg

Comment by Jörg Thönnes [ 31/May/12 ]

You could manipulate the outgoing messages in this callback:

    /**
     * This is a callback for application messages that you are sending to a
     * counterparty. If you throw a DoNotSend exception in this function, the
     * application will not send the message. This is mostly useful if the
     * application has been asked to resend a message such as an order that is
     * no longer relevant for the current market. Messages that are being resent
     * are marked with the PossDupFlag in the header set to true; If a DoNotSend
     * exception is thrown and the flag is set to true, a sequence reset will be
     * sent in place of the message. If it is set to false, the message will
     * simply not be sent. You may add fields before an application message
     * before it is sent out.
     * 
     * @param message
     *            QuickFIX message
     * @param sessionId
     *            QuickFIX session ID
     * @throws DoNotSend --
     *             This exception aborts message transmission
     */
    void toApp(Message message, SessionID sessionId) throws DoNotSend;
Generated at Sat Nov 23 12:02:25 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.