Need help regarding multiple acceptor

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Need help regarding multiple acceptor

Pradeep's
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



HI Quickfixj Team,

I need a small help in configuring multiple acceptor.

In my Project I have written below code:
"
SessionID sessionID= socektAcceptor.getSessions().get(0);
Session = Session.lookupSession(sessionID);
"

As acceptor can have multiple sessions. Which means that on a get(0), one finds a session but not necessarily the one that one wishes.
In our case, there is a priority only a session, but if it changes, we risk not sending the message to the right recipient.

I got this code from some google search and now it seems that it will not work properly. 
Please suggest me the right way of creating sessionID for multiple acceptor, or if the above code is right then please explain how it is working.

Thanks in advance.

Regards,
Deep


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help regarding multiple acceptor

Colin DuPlantis
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



You should be using an Application with the socket acceptor which will identify that session on which the a particular message is received. Associate that SessionID with anything that happens as a result of that original message. That way, you know what session to return the message to.


On 01/07/2017 10:03 AM, Pradeep's wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/




HI Quickfixj Team,

I need a small help in configuring multiple acceptor.

In my Project I have written below code:
"
SessionID sessionID= socektAcceptor.getSessions().get(0);
Session = Session.lookupSession(sessionID);
"

As acceptor can have multiple sessions. Which means that on a get(0), one finds a session but not necessarily the one that one wishes.
In our case, there is a priority only a session, but if it changes, we risk not sending the message to the right recipient.

I got this code from some google search and now it seems that it will not work properly. 
Please suggest me the right way of creating sessionID for multiple acceptor, or if the above code is right then please explain how it is working.

Thanks in advance.

Regards,
Deep



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help regarding multiple acceptor

Pradeep's
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Could you please help us for sample code.? It was little difficult to understand

From: [hidden email]
Sent: ‎08-‎01-‎2017 12:28 AM
To: [hidden email]
Subject: Re: [Quickfixj-users] Need help regarding multiple acceptor

You should be using an Application with the socket acceptor which will identify that session on which the a particular message is received. Associate that SessionID with anything that happens as a result of that original message. That way, you know what session to return the message to.


On 01/07/2017 10:03 AM, Pradeep's wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/




HI Quickfixj Team,

I need a small help in configuring multiple acceptor.

In my Project I have written below code:
"
SessionID sessionID= socektAcceptor.getSessions().get(0);
Session = Session.lookupSession(sessionID);
"

As acceptor can have multiple sessions. Which means that on a get(0), one finds a session but not necessarily the one that one wishes.
In our case, there is a priority only a session, but if it changes, we risk not sending the message to the right recipient.

I got this code from some google search and now it seems that it will not work properly. 
Please suggest me the right way of creating sessionID for multiple acceptor, or if the above code is right then please explain how it is working.

Thanks in advance.

Regards,
Deep



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help regarding multiple acceptor

Christoph John
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


http://www.quickfixj.org/quickfixj/usermanual/1.6.3/
and specifically http://www.quickfixj.org/quickfixj/usermanual/1.6.3/usage/application.html

Chris.

On 08/01/17 06:30, Pradeep Gorai wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
>
> Could you please help us for sample code.? It was little difficult to understand
> ----------------------------------------------------------------------------------------------------
> From: Colin DuPlantis <mailto:[hidden email]>
> Sent: ‎08-‎01-‎2017 12:28 AM
> To: [hidden email] <mailto:[hidden email]>
> Subject: Re: [Quickfixj-users] Need help regarding multiple acceptor
>
> You should be using an Application with the socket acceptor which will identify that session on
> which the a particular message is received. Associate that SessionID with anything that happens as
> a result of that original message. That way, you know what session to return the message to.
>
>
> On 01/07/2017 10:03 AM, Pradeep's wrote:
>> QuickFIX/J Documentation:http://www.quickfixj.org/documentation/
>> QuickFIX/J Support:http://www.quickfixj.org/support/
>>
>>
>>
>>
>> HI Quickfixj Team,
>>
>> I need a small help in configuring multiple acceptor.
>>
>> In my Project I have written below code:
>> "
>> SessionID sessionID= socektAcceptor.getSessions().get(0);
>> Session = Session.lookupSession(sessionID);
>> "
>>
>> As acceptor can have multiple sessions. Which means that on a get(0), one finds a session but not
>> necessarily the one that one wishes.
>> In our case, there is a priority only a session, but if it changes, we risk not sending the
>> message to the right recipient.
>>
>> I got this code from some google search and now it seems that it will not work properly.
>> Please suggest me the right way of creating sessionID for multiple acceptor, or if the above code
>> is right then please explain how it is working.
>>
>> Thanks in advance.
>>
>> Regards,
>> Deep
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org!http://sdm.link/slashdot
>>
>>
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
       


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help regarding multiple acceptor

Colin DuPlantis
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Here's a little more detail:

When you create your Acceptor (you're using a ThreadedSocketAcceptor
since you have multiple sessions, I assume), one of the constructor
patterns allows you to specify an Application implementor. Use that:

Application myApplicationImplementation = getApplication();
Acceptor myAcceptor = new ThreadedSocketAcceptor(myApplicationImplementation,messageStoreFactory,sessionSettings,logFactory,messageFactory);

...

In your Application implementation, you'll find calls like this:

public void fromApp(SessionID inSessionId,Message inMessage)
{
     // you actually want to use a MessageCracker here, but I'll leave that you
     // let's assume this message is an incoming order. naturally, you'd have to verify that on your own
     Message newOrder = inMessage;
     // this key captures the sessionId and the clOrdId from this order - remember that clOrdId needs to be unique
     //  only for this session and this day, so could be reused if this order is closed or on another session
     MyUniqueKeyForNewOrder newOrderKey = new MyUniqueKeyForNewOrder(newOrder);
     ... something happens with this new order ...
}

... handling execution reports for this new order

Message executionReport = magicReportProducerNext();
MyUniqueKeyForNewOrder theKeyIAlreadyCreated = getKeyForExecutionReport(executionReport);
boolean result = Session.sendToTarget(theKeyIAlreadCreated.getSessionID(),executionReport);

This way, you don't have to iterate over SessionIDs and try to match them.

On 01/09/2017 01:02 AM, Christoph John wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
> http://www.quickfixj.org/quickfixj/usermanual/1.6.3/
> and specifically http://www.quickfixj.org/quickfixj/usermanual/1.6.3/usage/application.html
>
> Chris.
>
> On 08/01/17 06:30, Pradeep Gorai wrote:
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>>
>>
>>
>>
>> Could you please help us for sample code.? It was little difficult to understand
>> ----------------------------------------------------------------------------------------------------
>> From: Colin DuPlantis <mailto:[hidden email]>
>> Sent: ‎08-‎01-‎2017 12:28 AM
>> To: [hidden email] <mailto:[hidden email]>
>> Subject: Re: [Quickfixj-users] Need help regarding multiple acceptor
>>
>> You should be using an Application with the socket acceptor which will identify that session on
>> which the a particular message is received. Associate that SessionID with anything that happens as
>> a result of that original message. That way, you know what session to return the message to.
>>
>>
>> On 01/07/2017 10:03 AM, Pradeep's wrote:
>>> QuickFIX/J Documentation:http://www.quickfixj.org/documentation/
>>> QuickFIX/J Support:http://www.quickfixj.org/support/
>>>
>>>
>>>
>>>
>>> HI Quickfixj Team,
>>>
>>> I need a small help in configuring multiple acceptor.
>>>
>>> In my Project I have written below code:
>>> "
>>> SessionID sessionID= socektAcceptor.getSessions().get(0);
>>> Session = Session.lookupSession(sessionID);
>>> "
>>>
>>> As acceptor can have multiple sessions. Which means that on a get(0), one finds a session but not
>>> necessarily the one that one wishes.
>>> In our case, there is a priority only a session, but if it changes, we risk not sending the
>>> message to the right recipient.
>>>
>>> I got this code from some google search and now it seems that it will not work properly.
>>> Please suggest me the right way of creating sessionID for multiple acceptor, or if the above code
>>> is right then please explain how it is working.
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> Deep
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org!http://sdm.link/slashdot
>>>
>>>
>>> _______________________________________________
>>> Quickfixj-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>>
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Loading...