I am attempting to convert a C# version of a rabbitmq producer to one in java and the one issue I am having is figuring out how to send a message header with multiple string values. I think I may have found it but how would I add additional values to header. Current code:
AMQP.BasicProperties.Builder builder = new AMQP.BasicProperties().builder();
builder.headers(Collections.<String,Object>singletonMap("pId",ID));
builder.headers(Collections.<String,Object>singletonMap("query",searchQ));
pchannel.basicPublish("","best_queue",builder.build(),post.getBytes());
System.out.println(" [x] Sent '" + msgcount.toString() + "' MESSAGES.");
But only the last header property appears. How do I get to add more values to the header?