Quantcast
Channel: User Jonathan - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by Jonathan for Handling connection failures in apache-camel

$
0
0

For automatic RabbitMQ resource recovery (Connections/Channels/Consumers/Queues/Exchanages/Bindings) when failures occur, check out Lyra (which I authored). Example usage:

Config config = new Config()  .withRecoveryPolicy(new RecoveryPolicy()    .withMaxAttempts(20)    .withInterval(Duration.seconds(1))    .withMaxDuration(Duration.minutes(5)));ConnectionOptions options = new ConnectionOptions().withHost("localhost");Connection connection = Connections.create(options, config);

The rest of the API is just the amqp-client API, except your resources are automatically recovered when failures occur.

I'm not sure about camel-rabbitmq specifically, but hopefully there's a way you can swap in your own resource creation via Lyra.


Viewing all articles
Browse latest Browse all 40

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>