Skip to content

Commit 9637a39

Browse files
committed
introduce basicPublish/5, to hide 'immediate'
...since we no longer support it. Also, make description of mandatory/immediate params devoid of (misleading) meaning.
1 parent 89bdabf commit 9637a39

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public interface Channel extends ShutdownNotifier {
231231
void basicQos(int prefetchCount) throws IOException;
232232

233233
/**
234-
* Publish a message with both "mandatory" and "immediate" flags set to false
234+
* Publish a message
235235
* @see com.rabbitmq.client.AMQP.Basic.Publish
236236
* @param exchange the exchange to publish the message to
237237
* @param routingKey the routing key
@@ -246,8 +246,22 @@ public interface Channel extends ShutdownNotifier {
246246
* @see com.rabbitmq.client.AMQP.Basic.Publish
247247
* @param exchange the exchange to publish the message to
248248
* @param routingKey the routing key
249-
* @param mandatory true if we are requesting a mandatory publish
250-
* @param immediate true if we are requesting an immediate publish
249+
* @param mandatory true if the 'mandatory' flag is to be set
250+
* @param props other properties for the message - routing headers etc
251+
* @param body the message body
252+
* @throws java.io.IOException if an error is encountered
253+
*/
254+
void basicPublish(String exchange, String routingKey, boolean mandatory, BasicProperties props, byte[] body)
255+
throws IOException;
256+
257+
/**
258+
* Publish a message
259+
* @see com.rabbitmq.client.AMQP.Basic.Publish
260+
* @param exchange the exchange to publish the message to
261+
* @param routingKey the routing key
262+
* @param mandatory true if the 'mandatory' flag is to be set
263+
* @param immediate true if the 'immediate' flag is to be
264+
* set. Note that the RabbitMQ server does not support this flag.
251265
* @param props other properties for the message - routing headers etc
252266
* @param body the message body
253267
* @throws java.io.IOException if an error is encountered

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,16 @@ public void basicPublish(String exchange, String routingKey,
605605
BasicProperties props, byte[] body)
606606
throws IOException
607607
{
608-
basicPublish(exchange, routingKey, false, false, props, body);
608+
basicPublish(exchange, routingKey, false, props, body);
609+
}
610+
611+
/** Public API - {@inheritDoc} */
612+
public void basicPublish(String exchange, String routingKey,
613+
boolean mandatory,
614+
BasicProperties props, byte[] body)
615+
throws IOException
616+
{
617+
basicPublish(exchange, routingKey, mandatory, false, props, body);
609618
}
610619

611620
/** Public API - {@inheritDoc} */

0 commit comments

Comments
 (0)