Publish json using rabbitmqadmin

The handy dandy rabbitmqadmin tool makes it simple to publish a message, but (possibly depending on the client library at the other end) if you want it to appear as json rather than a string, you need to set a few options:

./rabbitmqadmin publish exchange=foo \
    properties='{"content_type":"application/json"}' \
    payload='{}' payload_encoding='string'

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s