我希望向可以在注册时设置自己的ETA的用户发出提醒。因此,如果他无法及时到达那么我希望向用户发出警报。我如何实现这一目标? Ii在wso2esb中引用了TASK SCHEDULING,但它定义了静态请求和静态时间,每个用户的时间都不同。我该怎么做动态? 即使我尝试过ACTIVE MQ调度但没有用。对此有何帮助?
PROPERTY NAME TYPE DESCRIPTION
AMQ_SCHEDULED_DELAY long The time in milliseconds that a message will wait before being scheduled to be delivered by the broker
AMQ_SCHEDULED_PERIOD long The time in milliseconds to wait after the start time to wait before scheduling the message again
AMQ_SCHEDULED_REPEAT int The number of times to repeat scheduling a message for delivery
AMQ_SCHEDULED_CRON String Use a Cron entry to set the schedule.
我添加了像这样的代理
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="JMSSCHEDULE11"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
<log level="full"/>
<property name="messageType" value="application/json" scope="axis2"/>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED"
value="true"
scope="axis2"
type="STRING"/>
<property name="AMQ_SCHEDULED_DELAY"
value="3000000000000000"
scope="transport"
type="STRING"/>
<send>
<endpoint>
<address uri="jms:/JMSSCHEDULE?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://127.0.0.1:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
</inSequence>
<outSequence/>
</target>
<parameter name="delay">300000000000</parameter>
<description/>
</proxy>
&GT;
即使它不起作用
答案 0 :(得分:1)
您需要在默认情况下禁用的activemq中启用调度程序支持。
您需要在以下位置编辑文件:D:\ Installed \ apache-activemq-5.9-SNAPSHOT \ conf \ activemq.xml
<broker xmlns="http://activemq.apache.org/schema/core" advisorySupport="false" brokerName="localhost" dataDirectory="${activemq.data}" schedulerSupport="true">
启用调度程序后,您可以在ActiveMQ的管理员Web控制台上看到新标签“预定”
http://localhost:8161/admin/scheduled.jsp
答案 1 :(得分:0)
您需要添加此属性并需要修改activemq.xml文件作为schedulerSupport =&#34; true
<property name="AMQ_SCHEDULED_DELAY"
value="3000000000000000"
scope="transport"
type="STRING"/>