Closed eagle275 closed 3 years ago
Hi @eagle275
You can set ConnectionId on Open
frame. The parameter you need to set is called ContainerId
. Just use this overload of CreateAsync
method on ConnectionFactory
object:
public Task<Connection> CreateAsync(Address address, Open open = null, OnOpened onOpened = null);
By default ContainerId
is resolved as follows:
"AMQPNetLite-" + Guid.NewGuid().ToString("N").Substring(0, 8)
Alternatively you can use the connection factory to create a connection. The factory settings support many protocol level configurations.
ConnectionFactory factory = new ConnectionFactory();
factory.AMQP.ContainerId = "my-amqp-container";
Connection connection = await factory.CreateAsync(address);
Thank you for your answers .. infact I already set the ContainerId over the factory much like xinchen10 shows. I only didnt know that "again" somebody decided to use a different name ^^ Issue can be closed !
As headline says - how do I set programmatically the connection ID for the created connection going from a factory
We send messages to a broker system and have confirmation that packets arrive and pass through a firewall .. so they should arrive at the broker - alas "they" cant find them - most likely because this broker receives all kinds of messages for one of Germany's biggest corporations. The broker runs on ActiveMQ - and when I test, it doesnt offer any option to search - so if one queue receives many messages it gets tiresome to find the specific message. We typically send less than 20 over a full day...
So the connection ID would really help ... how do I set it - or at least find out, what connection ID is used while sending an AMQP message?
Thanks in advance