@@ -300,61 +300,12 @@ void basicPublish(String exchange, String routingKey, boolean mandatory, BasicPr
300300 void basicPublish (String exchange , String routingKey , boolean mandatory , boolean immediate , BasicProperties props , byte [] body )
301301 throws IOException ;
302302
303- /**
304- * Publish a message with a {@link ByteBuffer} body for zero-copy transmission.
305- *
306- * <p>The buffer's content between its current position and its limit will be sent.
307- * The caller must not modify the buffer after this call returns.
308- *
309- * @see #basicPublish(String, String, BasicProperties, byte[])
310- * @param exchange the exchange to publish the message to
311- * @param routingKey the routing key
312- * @param props other properties for the message - routing headers etc
313- * @param body the message body
314- * @throws java.io.IOException if an error is encountered
315- */
316- default void basicPublish (String exchange , String routingKey , BasicProperties props , ByteBuffer body ) throws IOException {
317- basicPublish (exchange , routingKey , false , false , props , body , null );
318- }
319-
320- /**
321- * Publish a message with a {@link ByteBuffer} body for zero-copy transmission.
322- *
323- * @see #basicPublish(String, String, boolean, BasicProperties, byte[])
324- * @param exchange the exchange to publish the message to
325- * @param routingKey the routing key
326- * @param mandatory true if the 'mandatory' flag is to be set
327- * @param props other properties for the message - routing headers etc
328- * @param body the message body
329- * @throws java.io.IOException if an error is encountered
330- */
331- default void basicPublish (String exchange , String routingKey , boolean mandatory , BasicProperties props , ByteBuffer body )
332- throws IOException {
333- basicPublish (exchange , routingKey , mandatory , false , props , body , null );
334- }
335-
336- /**
337- * Publish a message with a {@link ByteBuffer} body for zero-copy transmission.
338- *
339- * @see #basicPublish(String, String, boolean, boolean, BasicProperties, byte[])
340- * @param exchange the exchange to publish the message to
341- * @param routingKey the routing key
342- * @param mandatory true if the 'mandatory' flag is to be set
343- * @param immediate true if the 'immediate' flag is to be
344- * set. Note that the RabbitMQ server does not support this flag.
345- * @param props other properties for the message - routing headers etc
346- * @param body the message body
347- * @throws java.io.IOException if an error is encountered
348- */
349- default void basicPublish (String exchange , String routingKey , boolean mandatory , boolean immediate , BasicProperties props , ByteBuffer body )
350- throws IOException {
351- basicPublish (exchange , routingKey , mandatory , immediate , props , body , null );
352- }
353-
354303 /**
355304 * Publish a message with a {@link ByteBuffer} body and a {@link WriteListener} for
356305 * write completion notification.
357306 *
307+ * <p>The buffer's content between its current position and its limit will be sent.
308+ *
358309 * <p>The listener is called when the network layer has finished writing the body to the
359310 * socket. This is useful for off-heap buffers that must be released after the write completes.
360311 *
@@ -363,39 +314,6 @@ default void basicPublish(String exchange, String routingKey, boolean mandatory,
363314 *
364315 * @param exchange the exchange to publish the message to
365316 * @param routingKey the routing key
366- * @param props other properties for the message - routing headers etc
367- * @param body the message body
368- * @param listener called when the write completes, may be {@code null}
369- * @throws java.io.IOException if an error is encountered
370- */
371- default void basicPublish (String exchange , String routingKey , BasicProperties props , ByteBuffer body , WriteListener listener )
372- throws IOException {
373- basicPublish (exchange , routingKey , false , false , props , body , listener );
374- }
375-
376- /**
377- * Publish a message with a {@link ByteBuffer} body and a {@link WriteListener} for
378- * write completion notification.
379- *
380- * @param exchange the exchange to publish the message to
381- * @param routingKey the routing key
382- * @param mandatory true if the 'mandatory' flag is to be set
383- * @param props other properties for the message - routing headers etc
384- * @param body the message body
385- * @param listener called when the write completes, may be {@code null}
386- * @throws java.io.IOException if an error is encountered
387- */
388- default void basicPublish (String exchange , String routingKey , boolean mandatory , BasicProperties props , ByteBuffer body , WriteListener listener )
389- throws IOException {
390- basicPublish (exchange , routingKey , mandatory , false , props , body , listener );
391- }
392-
393- /**
394- * Publish a message with a {@link ByteBuffer} body and a {@link WriteListener} for
395- * write completion notification.
396- *
397- * @param exchange the exchange to publish the message to
398- * @param routingKey the routing key
399317 * @param mandatory true if the 'mandatory' flag is to be set
400318 * @param immediate true if the 'immediate' flag is to be
401319 * set. Note that the RabbitMQ server does not support this flag.
0 commit comments