Reply Topic name in InboundMessage - GOLANG API

Options
cjunior1
cjunior1 Member Posts: 4
edited June 2022 in PubSub+ Event Broker #1

HI,

I need to get reply to topic in message received in gateway mode.. It's possible? Exist some a property? I tried thus...

reply_to, _ := message.GetProperty("reply_to")

but not working... returned nill...

How to do for get reply topic name in the message????

I am using GOLANG API 1.0.1...

Thanks for help..

Tagged:

Comments

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 491 admin
    Options

    Hey @cjunior1 - what are you trying to do with the reply_to topic? If you are attempting to implement Request/Reply it is still not supported in v1.0.1 of the Go API (you can see a list of supported features per API here)

    Once request/reply is supported, you will be able to implement it by using the RequestReplyMessagePublisher and RequestReplyMessageReceiver as seen in the python samples (direct_requestor.pr and direct_replier) https://github.com/SolaceSamples/solace-samples-python/tree/master/patterns

    Can you also provide me more information about your use-case? thanks!

  • cjunior1
    cjunior1 Member Posts: 4
    edited June 2022 #3
    Options

    Hi @Tamimi ... Thanks for you answer...

    I need request/reply because my VPN is microgateway mode and expose rest subscription and I need of the consumer in Golang for call other system and input reply in topic... (I dont use RDP because exist transformation of data before call other system)

    I take the topic name by string method of message... I use strings.Fields and I take the name in position 25... 

    Is valid or secure my solution??? In python is Ok for direct!!! But in python I have that same problem for guaranteed use case... because only exist for direct...

    I have that to use Queue in request/reply because I need load balance(round-robin) between many instances of same consumer... I can't use the pub/sub....

     But, if you know other solution or in case this is bad practice (use queue in req/reply)...please explain


    Thanks for your time!!!!