Without a receipt header your application will fire messages potentially faster than the broker can receive them at. The broker may issue failure notices however STOMP being asynchronous your client won't get to see it.
Without a receipt ActiveMQ (5.5.0) with ProducerFlowControl turned on drops messages (even persistent ones) and my application knows nothing about it (send() returned true). With receipt header specified the STOMP library handles the wait for the receipt acknowledgement for you - you are essentially automatically throttled.
Stomp::send
stomp_send
(PECL stomp >= 0.1.0)
Stomp::send -- stomp_send — Envía un mensaje
Descripción
Estilo orientado a objetos (método):
Estilo por procedimientos:
Envía un mensaje a el Message Broker.
Parámetros
-
link -
Sólo estilo por procediminetos: El identificador de enlace Stomp devuelto por stomp_connect().
-
destination -
A dónde eenviar el mensaje
-
msg -
Mensaje a enviar.
-
headers -
Array asociativo conteniendo los headers adicionales (ejemplo: receipt).
Valores devueltos
Devuelve TRUE en caso de éxito o FALSE en caso de error.
Notas
Nota:
Un header de transacción puede ser especificado, indicando que el mensaje de Acknowledgment debería formar parte del nombre de la transacción.
Stomp es inherentemente asíncrono. Comunicación sincrónica puede ser implementada agregando un header receipt. Esto ocasionará métodos para no devolver nada hasta que el servidor haya recibido un Acknowledgment del mensaje o hasta que el tiempo de espera para lectura se agote.
Ejemplos
Vea stomp_ack().
