-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add channel QoS setting #13
Conversation
* | ||
* @see com.rabbitmq.client.Channel#basicQos(int) | ||
*/ | ||
private final int channelsQos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this value have to be final
? QoS changes on the fly are not very common but possible in AMQP 0-9-1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be final
. The intent is to have a RMQConnection
creating AMQP channels with the same settings, not more. Not sure users are coding against the RMQConnection
class, but more against the JMS *Connection
interfaces. We can make it volatile
and expose it with getter/setter, it should be harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is not how Java client works but we can safely switch it to per-session (connection) strategy later if JMS users care enough. Going the other way would be a breaking change.
@@ -47,7 +47,9 @@ | |||
*/ | |||
public class RMQConnection implements Connection, QueueConnection, TopicConnection { | |||
|
|||
private final Logger logger = LoggerFactory.getLogger(RMQConnection.class);; | |||
public static final int NO_CHANNEL_QOS = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intent here to have no limit by default? Then it should be 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent is to skip any call to basicQos
: 2a7ffc4#diff-9f6f94ce0c4ddde9be9f61d3dba10487R339
Fixes #11