Giter VIP home page Giter VIP logo

Comments (4)

spring-operator avatar spring-operator commented on May 1, 2024

Dave Syer commented

#1629 covered the trasnactional semantics for synchronous clients. It uses basicRecover(), so the async clients probably should as well.

from spring-amqp.

spring-operator avatar spring-operator commented on May 1, 2024

Dave Syer commented

One aspect of this problem is that the connection factory does not re-create channels that are closed automatically by the Rabbit client on exception. An easy way to see this is to simply try and access the broker in some "harmless" way, expecting an exception:

template.execute(new ChannelCallback<DeclareOk>() {
	public DeclareOk doInRabbit(Channel channel) throws Exception {
		DeclareOk ok = channel.queueDeclarePassive("test.queue");
		return ok;
	}
});

if the queue doesn't exist there is an exception. Catch it and then try:

admin.declareQueue(new Queue("test.queue"));

this should succeed but fails with {com.rabbitmq.client.AlreadyClosedException} because the template is trying to use the same channel that was closed in the first exception.

from spring-amqp.

spring-operator avatar spring-operator commented on May 1, 2024

Dave Syer commented

I committed a change to the CCF to refresh the channel when it dies after an exception. This has some overlap with #1613 ("connection retry") because it doesn't make sense for some clients to simply ignore a channel closing because it might have exclusive consumers (for instance). It does make sense in some cases though, and it fixes an integration test, so I decided to commit and re-visit when we get to the other retry use cases.

from spring-amqp.

spring-operator avatar spring-operator commented on May 1, 2024

Dave Syer commented

This is now OK after #1613 was fixed.

from spring-amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.