이 콘텐츠는 선택한 언어로 제공되지 않습니다.
21.3.2. Streaming over JMS
When using JMS, HornetQ maps the streaming methods on the core API (see Table 21.1, “org.hornetq.api.core.client.ClientMessage API”) by setting object properties. You can use the method
Message.setObjectProperty
to set the input and output streams.
The
InputStream
can be defined through the JMS Object Property JMS_HQ_InputStream on messages being sent:
The
OutputStream
can be set through the JMS Object Property JMS_HQ_SaveStream on messages being received in a blocking way.
Setting the
OutputStream
could also be done in a non-blocking way using the property JMS_HQ_OutputStream.
// This will not wait the stream to finish. You need to keep the consumer active. messageReceived.setObjectProperty("JMS_HQ_OutputStream", bufferedOutput);
// This will not wait the stream to finish. You need to keep the consumer active.
messageReceived.setObjectProperty("JMS_HQ_OutputStream", bufferedOutput);
Note
When using JMS, Streaming large messages are only supported on
StreamMessage
and BytesMessage
.