Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions lead to BAD_TOPIC error #24

Open
AUK1939 opened this issue Aug 22, 2024 · 1 comment
Open

Subscriptions lead to BAD_TOPIC error #24

AUK1939 opened this issue Aug 22, 2024 · 1 comment

Comments

@AUK1939
Copy link

AUK1939 commented Aug 22, 2024

When running the subscription example

topic = "//blp/mktdata/ticker/PETR4 BS Equity?fields=BID,ASK"
subscription_list = BLPData.subscribe(session, topic)

I get the following warning

22AUG2024_15:22:12.749 17900:33112 WARN blpapi_subscriptionmanager.cpp:7476 blpapi.session.{1}.clusterservicehandler.subscriptionmanager SubscriptionLost for unknown data set with stream id 1 { ConnectionContext=[0/1] }
1

continuing with the provided example

i = 1 # event counter
evn = BLPData.try_next_event(session)
while evn != nothing
    println("event \$i")
    println(evn)
    i += 1
    sleep(2) # let's wait for events
    evn = BLPData.try_next_event(session)
end

I get the following error

Event BLPAPI_EVENTTYPE_SUBSCRIPTION_STATUS
Message 1
BLPData.CorrelationId[CorrelationId(5)]
    BLPName("SubscriptionStarted") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("exceptions") <: Element{true, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("streamIds") <: Element{true, BLPAPI_DATATYPE_STRING} = Any["1"]
        BLPName("receivedFrom") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
            BLPName("address") <: Element{false, BLPAPI_DATATYPE_STRING} = 127.0.0.1:8194
        BLPName("reason") <: Element{false, BLPAPI_DATATYPE_STRING} = Subscriber made a subscription
Message 2
BLPData.CorrelationId[CorrelationId(5)]
    BLPName("SubscriptionStreamsActivated") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("streams") <: Element{true, BLPAPI_DATATYPE_SEQUENCE}
            BLPName("streams") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
                BLPName("id") <: Element{false, BLPAPI_DATATYPE_STRING} = 1
                BLPName("endpoint") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
                    BLPName("address") <: Element{false, BLPAPI_DATATYPE_STRING} = 127.0.0.1:8194
        BLPName("reason") <: Element{false, BLPAPI_DATATYPE_STRING} = Subscriber made a subscription


event $i
Event BLPAPI_EVENTTYPE_SUBSCRIPTION_STATUS
Message 1
BLPData.CorrelationId[CorrelationId(5)]
    BLPName("SubscriptionStarted") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("exceptions") <: Element{true, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("streamIds") <: Element{true, BLPAPI_DATATYPE_STRING} = Any["1"]
        BLPName("receivedFrom") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
            BLPName("address") <: Element{false, BLPAPI_DATATYPE_STRING} = 127.0.0.1:8194
        BLPName("reason") <: Element{false, BLPAPI_DATATYPE_STRING} = Subscriber made a subscription
Message 2
BLPData.CorrelationId[CorrelationId(5)]
    BLPName("SubscriptionStreamsActivated") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("streams") <: Element{true, BLPAPI_DATATYPE_SEQUENCE}
            BLPName("streams") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
                BLPName("id") <: Element{false, BLPAPI_DATATYPE_STRING} = 1
                BLPName("endpoint") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
                    BLPName("address") <: Element{false, BLPAPI_DATATYPE_STRING} = 127.0.0.1:8194
        BLPName("reason") <: Element{false, BLPAPI_DATATYPE_STRING} = Subscriber made a subscription

event $i
Event BLPAPI_EVENTTYPE_SUBSCRIPTION_STATUS
Message 1
BLPData.CorrelationId[CorrelationId(5)]
    BLPName("SubscriptionTerminated") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
        BLPName("reason") <: Element{false, BLPAPI_DATATYPE_SEQUENCE}
            BLPName("errorCode") <: Element{false, BLPAPI_DATATYPE_INT32} = 5
            BLPName("description") <: Element{false, BLPAPI_DATATYPE_STRING} = Invalid UTS
            BLPName("category") <: Element{false, BLPAPI_DATATYPE_STRING} = BAD_TOPIC
            BLPName("source") <: Element{false, BLPAPI_DATATYPE_STRING} = apipubx0@md1p-rr-270

Any ideas on what might be causing the problem?

This issue is also reported on stackoverflow by somebody else here

@sob727
Copy link

sob727 commented Oct 27, 2024

I am the person who reported on Stack Overflow. Never got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants