question

Upvotes
5 2 2 1

Java EMA: Problem subscribing to realtime and delayed ticker at same time

I'm able to subscribe to delayed names like /IBM.N and /SPY.P, but if I try to subscript to SPY.P, I cannot subsequently subscribe to /SPY.P when the user I'm subscribing with isn't permissioned for real-time.

What I'm seeing is that I try to subscribe to "SPY.P", and I get back a NotAuthorized status in onStatusMsg. When I receive that, I call OmmConsumer.unregister(handle) to unregister the SPY.P subscription, and then attempt to subscribe to "/SPY.P".

However, the consumer thinks I'm just trying to subscribe to SPY.P - I get a second NotAuthorized error and msg.getName() is "SPY.P", whereas it should be "/SPY.P". How can I successfully do this, or do I just have to do something like open up a second consumer for delayed subscriptions?

(I did try creating a second OmmConsumer just for delayed subscriptions, as a workaround, but then the delayed subscription on the second consumer results in a "Received an item event without user specified pointer or stream info" ItemCallbackException.

Looking for any advice on how to handle this.

Thanks,

Shawn

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @shawn11

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS

Hello @shawn11

If the problem still occurs, please send us your source code as requested by Jirapongse. This will allow us to help you to investigate the problem.

Upvotes
78.9k 250 52 74

@shawn11

From my test, this problem has been solved in Elektron SDK - Java - 1.1.1.E2. You can download it from here.

Please try it and let us know the result.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@shawn11

Please kindly update the progress of this issue.

If you still see the problem, please share the code. Therefore, we can use it to replicate the issue.

Upvotes
5 2 2 1

@jirapongse.phuriphanvichai I'm still getting the same error in 1.1.1.E2

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
78.9k 250 52 74

@shawn11

My code may be too simple. Please see the attached file. consumerjava.txt

If I use EMA Java 1.1.1.E2, the output is:

StatusMsg
    streamId="5"
    domain="MarketPrice Domain"
    state="Closed / Suspect / Not entitled / 'Access Denied: User req to IDN for Exch - NYS'"
    name="IBM.N"
    nameType="1"
    serviceId="2115"
    serviceName="API_ELEKTRON_EPD_RSSL"
StatusMsgEnd
RefreshMsg
    streamId="6"
    domain="MarketPrice Domain"
    solicited
    RefreshComplete
    state="Open / Ok / None / 'All is well'"
    itemGroup="00 01"
    permissionData="03 08 43 40 17 c0"
    name="/IBM.N"
    nameType="1"
    serviceId="2115"
    serviceName="API_ELEKTRON_EPD_RSSL"
    Payload dataType="FieldList"

From the output, it can subscribe to /IBM.N when IBM.N is access denied.

However, if I use the same code with EMA Java 1.1.1.L1, I get this output.

StatusMsg
    streamId="5"
    domain="MarketPrice Domain"
    state="Closed / Suspect / Not entitled / 'Access Denied: User req to IDN for Exch - NYS'"
    name="IBM.N"
    nameType="1"
    serviceId="2115"
    serviceName="API_ELEKTRON_EPD_RSSL"
StatusMsgEnd


StatusMsg
    streamId="6"
    domain="MarketPrice Domain"
    state="Closed / Suspect / Not entitled / 'Access Denied: User req to IDN for Exch - NYS'"
    name="IBM.N"
    nameType="1"
    serviceId="2115"
    serviceName="API_ELEKTRON_EPD_RSSL"
StatusMsgEnd

The subscribed item will always be IBM.N.

Could you please share your code?


consumerjava.txt (3.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
24.7k 54 17 14

Hello @shawn11

Could you please share us you source code as requested by Jirapongse?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.