We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Hello! Im having trouble trying to understand the BookCache class that you inject in the consumer. Do you have a code sample that you can share?
It's here --> https://github.com/Havret/a...
Hello, is it possible to pass a RecoveryPolicy or to disable the automatic recovery when I register the service?
If the Artemis server is not available when application try to start then the application doesn't start. Thank you
hi. many thanx for this article.
can you explain how to implement typed message producer from IProducer? please
Alex Nasyr
This should be as simple as:
public class MessageProducer
{
private readonly IProducer _producer;
public MessageProducer(IProducer producer)
{
_producer = producer;
}
public async Task PublishAsync<t>(T message)
{
var serialized = JsonSerializer.Serialize(message);
var msg = new Message(serialized);
await _producer.SendAsync(msg);
}
}
And then you have to register it as follows:
services.AddActiveMq("bookstore-cluster", new[] { Endpoint.Create(host: "localhost", port: 5672, "guest", "guest") })
.AddProducer<messageproducer>("my-address");
Just be mindful that while IAnonymousProducer can send messages to different addresses, IProducer is restricted to a single address.
I hope that answers your question.
thanx for your answer.))) it was the main problem - i try to operate with "address" inside of MessageProduser
How to define queue name in multicast routing, right now its generating random name for queue.
https://uploads.disquscdn.c...