Tôi muốn đặt <consumer-window-size/>
thành 0
. Điều này có vẻ là câu trả lời của một câu hỏi khác (JMS queue with multiple consumers), và được mô tả trong số này article trong chương 17.1.1. Tôi lấy lại nhà máy kết nối bằng JNDI. hornetq-jms.xml
của tôi trông như thế này:JBoss HornetQ: Đặt kích thước cửa sổ người tiêu dùng cho người tiêu dùng chậm
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="netty-connector"/>
</connectors>
<entries>
<entry name="ConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
</connection-factory>
<queue name="my.qeue">
<entry name="/queue/test"/>
</queue>
</configuration>
Phần <connection-factory/>
là sao chép & dán từ liên kết ở trên, nhưng tôi đã nhận lỗi:
DEPLOYMENTS IN ERROR:
Deployment "org.hornetq:module=JMS,name="ConnectionFactory",
type=ConnectionFactory" is in error due to the following reason(s):
HornetQException[errorCode=104 message=There is no connector with
name 'netty-connector' deployed.]
Đây có thể là JBoss-6 có liên quan, bởi vì trong các môi trường khác điều này dường như hoạt động: force order of messages with HornetQ
Cảm ơn bạn đã chỉ ra điều này! – Thor