-1

I have heard about Solace and I'm reading about it but I don't know much yet about it. I have a HashMap:

{Swaps_snaptime=2016-04-26T07:00:00.000Z, Swaps_20Y=2036-04-29 0.004588, Swaps_15Y=2031-04-29}

And I want to publish this to Solace. How do I do that? What are the steps I need to follow? Please help!

user3591433
  • 105
  • 1
  • 3
  • 11

1 Answers1

2

You need to execute the following tasks to send a message:

  1. Connect to the Solace Message Router
  2. Create a producer
  3. Create the message object
  4. Send the message

There's a simple example of how to do the above at the Solace website.

Note that the example makes use of TextMessages. In order to send your map, you can do the following:

  1. Serialize your map, and then send it as part of a BytesMessage.
  2. Place the contents of your map into a MapMessage.
  3. Place the contents of your map into a StreamMessage
  4. Use any message type, and place the contents of your map into the header portion of the message. Refer to How to send the header along with payload in Solace.
Community
  • 1
  • 1
Russell Sim
  • 1,693
  • 2
  • 14
  • 22