-1

I want to send json objects to Solace queue using python. Is there any library in Python to work with Solace queue. If yes, Please let me know the library and how to work with it. Thank you. -Praveen

pr320235
  • 3
  • 2
  • Welcome to StackOverflow. Please try searching first before asking a question. https://solace.com/samples/solace-samples-semp/messagevpn-with-queue-python/ – mattyx17 Jul 23 '20 at 16:23
  • This only helps to create solace queue. Not to fetch json object and send to queue. – pr320235 Jul 24 '20 at 20:27

1 Answers1

0

You can use JSON library from Python, documentation. Assuming you already have the sender and receiver like this example. A simple code is given below:

import json

# Create a json object
sample_data = {'name':'Praveen'}
json_data = json.dumps(sample_data)
# Use sender
event.sender.send(json_data)

You can also look at another example and link to code on Github.

Mrinal Roy
  • 969
  • 7
  • 12