-
Hi, I just came across your library, and it seems to be much more developer friendly than AMQPNetLite and there's good documentation so looks like a good candidate to replace bare AMQPNetLite which I just started experimenting with. thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi @pgarbo,
Update It should be as simple as: var endpoint = Endpoint.Create("localhost", 5672, "guest", "guest");
var connectionFactory = new ConnectionFactory();
var connection = await connectionFactory.CreateAsync(endpoint);
var topologyManager = await connection.CreateTopologyManagerAsync();
await topologyManager.CreateQueueAsync(new QueueConfiguration
{
Address = "my-address",
Name = "my-queue",
Durable = true,
AutoCreateAddress = true, // true if address doesn't exist
LastValueKey = "my-last-value-key" // set last value key
}); Then, later in your producing code you have to set application property with the key that matches the pre-defined var producer = await connection.CreateProducerAsync("my-address");
await producer.SendAsync(new Message("foo1")
{
ApplicationProperties =
{
["my-last-value-key"] = "1"
}
});
await producer.SendAsync(new Message("foo2")
{
ApplicationProperties =
{
["my-last-value-key"] = "1"
}
}); Please let me know if you happy with this, so I can cut an official release. Best, |
Beta Was this translation helpful? Give feedback.
Hi @pgarbo,
It's not possible at the moment, but that's sth I've got on my radar for a while. I will try to implement it over the weekend.Update
Please check 2.11.0-preview1
It should be as simple as: