This project is read-only.


Interop Client/Server examples; need for message.ToString()


Attached please find two more interoperability programs to match similar examples from Apache Qpid.

The client-server pair:
  • Requires a broker (or other entity) with a public node named "service_queue".
  • The server program attaches to service_queue and waits for requests.
  • The client program sends a request to service_queue and uses a temporary reply-to address for the response.
  • Upon receiving a request the server up-cases the request string and returns it in a response via the reply-to address.
  • Both the server and the client print the strings they receive and send.
This is an interesting example because it exposes an interoperability issue. See QPID-6308

It also exposes a difficulty in amqpnetlite: How does one print a message as a string? Depending on the AMQP encoding of the AmqpValue message the data may or may not render with a standard .ToString(). If you look at my example programs I started to dive into the message's types to figure out how to get a printable string. Maybe there is a better way to do this in the amqpnetlite interfaces to Class Amqp.Message.

file attachments

Closed Sep 1, 2015 at 2:11 AM by xinchen


crolke wrote Jan 19, 2015 at 4:42 PM

+1 on the body.ToString(). Thanks.

Current master branch at 042e5f7 doesn't compile for me. It looks like an updated LinkTests.cs that gets rid of message.ValueBody missed the last commit.