如何在Wildfly中使用CLI设置消息传递子系统 [英] How to set up messaging subsystem using CLI in Wildfly

查看:146
本文介绍了如何在Wildfly中使用CLI设置消息传递子系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人有示例脚本用于使用CLI在Wildfly中设置消息传递子系统吗?

Does anyone have an example script for setting up the messaging subsystem in Wildfly using CLI?

最完美的示例是运行服务器的服务器所需的CLI,该服务器运行standalone.xml,并且在运行CLI脚本后,它具有在standalone-full.xml中定义的消息传递子系统.

The perfect example would be the CLI needed to take a server running the standalone.xml, and after running the CLI script it has the messaging subsystem as defined in the standalone-full.xml.

到目前为止,我发现的所有示例均始于消息传递子系统已经存在的假设.

The examples I've found so far all start with the assumption the messaging subsystem is already in place.

推荐答案

以下是添加消息传递的脚本.这将添加消息传递子系统,并使其在运行standalone-full.xml时看起来像子系统.

Here's the script to add messaging. This adds the messaging subsystem, and makes it look like the subsystem when running standalone-full.xml.

/extension=org.jboss.as.messaging:add()
batch
/subsystem=messaging:add
/subsystem=messaging/hornetq-server=default:add
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-file-size, value=102400L)
/subsystem=messaging/hornetq-server=default/address-setting=#:add(address-full-policy="PAGE", \
    dead-letter-address="jms.queue.DLQ", expiry-address="jms.queue.ExpiryQueue", expiry-delay=-1L, \
    last-value-queue=false, max-delivery-attempts=10, max-size-bytes=10485760L, message-counter-history-day-limit=10, \
    page-max-cache-size=5, page-size-bytes=2097152L, redelivery-delay=0L, redistribution-delay=-1L, send-to-dla-on-no-route=false)

/subsystem=messaging/hornetq-server=default/in-vm-connector=in-vm:add(server-id=0)
/subsystem=messaging/hornetq-server=default/in-vm-acceptor=in-vm:add(server-id=0)

/subsystem=messaging/hornetq-server=default/http-connector=http-connector:add(socket-binding="http", param={http-upgrade-endpoint="http-acceptor"})
/subsystem=messaging/hornetq-server=default/http-connector=http-connector-throughput:add(socket-binding="http", param={http-upgrade-endpoint="http-acceptor-throughput", batch-delay=50})
/subsystem=messaging/hornetq-server=default/http-acceptor=http-acceptor:add(http-listener="default")
/subsystem=messaging/hornetq-server=default/http-acceptor=http-acceptor-throughput:add(http-listener="default", param={batch-delay=50, direct-deliver=false})

/subsystem=messaging/hornetq-server=default/connection-factory=InVmConnectionFactory:add(connector={"in-vm"=>undefined}, entries = ["java:/ConnectionFactory"])
/subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:add(connector={"http-connector"=>undefined}, entries = ["java:jboss/exported/jms/RemoteConnectionFactory"])

/subsystem=messaging/hornetq-server=default/pooled-connection-factory=hornetq-ra:add(connector={"in-vm"=>undefined}, entries=["java:/JmsXA","java:jboss/DefaultJMSConnectionFactory"])
/subsystem=messaging/hornetq-server=default/security-setting=#:add()
/subsystem=messaging/hornetq-server=default/security-setting=#/role=guest:add(consume=true, create-durable-queue=false, create-non-durable-queue=true, delete-durable-queue=false, delete-non-durable-queue=true, manage=false, send=true)

jms-queue add --queue-address=ExpiryQueue --durable=true --entries=["java:/jms/queue/ExpiryQueue"] 
jms-queue add --queue-address=DLQ --durable=true --entries=["java:/jms/queue/DLQ"]
run-batch

这篇关于如何在Wildfly中使用CLI设置消息传递子系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆