- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
<bean id="sessionQueuePersistance"
class="com.emph.SessionQueuePersistance">
<constructor-arg name="sessionInboundChannel" ref="sessionInboundChannel" />
</bean>
<int:channel id="sessionInboundChannel">
<int:queue message-store="sessionStore" />
<int:interceptors>
<int:ref bean="messageListener"/>
</int:interceptors>
</int:channel>
<bean id="messageListener" class="com.emph.MessageListener" />
<!-- int:logging-channel-adapter id="logger" log-full-message="true" level="INFO" /-->
<bean id="sessionStore"
class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore">
<property name="dataSource" ref="queueDataSource" />
<property name="channelMessageStoreQueryProvider" ref="queryProvider" />
<property name="tablePrefix" value="QUEUE_" />
</bean>
<bean id="queryProvider"
class="org.springframework.integration.jdbc.store.channel.OracleChannelMessageStoreQueryProvider" />
<bean id="queueDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" />
<property name="username" value="test" />
<property name="password" value="test" />
</bean>
<!-- the bridge polls the persisted messages and forwards them to the output
channel -->
<int:bridge input-channel="sessionInboundChannel"
output-channel="sessionOutboundChannel">
<int:poller fixed-rate="1000" max-messages-per-poll="-1">
<int:transactional transaction-manager="txManager" />
</int:poller>
</int:bridge>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="queueDataSource"/>
</bean>
<int:channel id="sessionOutboundChannel">
<int:dispatcher task-executor="taskExecutor" />
</int:channel>
<bean id="sessionQueueReader" class="com.emph.SessionReader" />
<int:service-activator input-channel="sessionOutboundChannel"
ref="sessionQueueReader" method="handleMessage" />
<bean id="taskExecutor"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="4" />
<property name="maxPoolSize" value="4" />
</bean>
关于此事的测试用例:
public class SessionQueuePersistanceTest {
public static void main(String[] args) {
AbstractApplicationContext context =
new ClassPathXmlApplicationContext("/session-queue-config.xml",
SessionQueuePersistanceTest.class);
SessionQueuePersistance sessionQueuePersistance =
(SessionQueuePersistance) context.getBean("sessionQueuePersistance");
sessionQueuePersistance.addSessionToQueue("testSession1");
sessionQueuePersistance.addSessionToQueue("testSession2");
sessionQueuePersistance.addSessionToQueue("testSession3");
sessionQueuePersistance.addSessionToQueue("testSession4");
sessionQueuePersistance.addSessionToQueue("testSession5");
sessionQueuePersistance.addSessionToQueue("testSession6");
sessionQueuePersistance.addSessionToQueue("testSession7");
sessionQueuePersistance.addSessionToQueue("testSession8");
sessionQueuePersistance.addSessionToQueue("testSession9");
try {
TimeUnit.SECONDS.sleep(360);
}catch(InteruptedException ex){
}
context.close();
}
}
public class SessionQueuePersistance {
private final QueueChannel sessionInboundChannel;
public SessionQueuePersistance(QueueChannel sessionInboundChannel) {
super();
this.sessionInboundChannel = sessionInboundChannel;
}
public boolean addSessionToQueue(String sessionString) {
Message<?> message = MessageBuilder.withPayload(sessionString).build();
executorChannel.send(message);
System.out.println(" --- addSessionToQueue: " + sessionString);
return true;
}
}
public class SessionReader {
public void handleMessage(String inputSession) {
System.out.println(" --- handling: " + inputSession);
}
}
我是 Spring 集成的新手,也许我的配置存在误解。
我的用例如下。我从 SessionQueuePersistance
Bean 向 sessionInboundChannel
发送消息。该 channel 包装在具有消息存储属性的队列中 - 消息应存储在数据库中。
日志:
2015-12-17 09:15:37,726 [INFO ] org.springframework.integration.config.IntegrationRegistrar - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2015-12-17 09:15:37,736 [DEBUG] org.springframework.integration.config.IntegrationRegistrar - SpEL function '#jsonPath' isn't registered: there is no jayway json-path.jar on the classpath.
2015-12-17 09:15:37,736 [DEBUG] org.springframework.integration.config.IntegrationRegistrar - SpEL function '#xpath' isn't registered: there is no spring-integration-xml.jar on the classpath.
2015-12-17 09:15:37,806 [INFO ] org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2015-12-17 09:15:37,816 [INFO ] org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2015-12-17 09:15:38,046 [DEBUG] org.springframework.integration.handler.ServiceActivatingHandler - Unable to attempt conversion of Message payload types. Component 'null' has no explicit ConversionService reference, and there is no 'integrationConversionService' bean within the context.
2015-12-17 09:15:38,056 [DEBUG] org.springframework.integration.config.GlobalChannelInterceptorProcessor - No global channel interceptors.
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.endpoint.PollingConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - Adding {service-activator} as a subscriber to the 'sessionOutboundChannel' channel
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.channel.ExecutorChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@5dccce3c.sessionOutboundChannel' has 1 subscriber(s).
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#1
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.channel.PublishSubscribeChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@5dccce3c.errorChannel' has 1 subscriber(s).
2015-12-17 09:15:38,066 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - started _org.springframework.integration.errorLogger
2015-12-17 09:15:38,066 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession1][Headers={id=a60e5680-9025-b62a-1eb9-5f032e9f7997, timestamp=1450340138066}]
2015-12-17 09:15:38,267 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=a60e5680-9025-b62a-1eb9-5f032e9f7997
2015-12-17 09:15:38,268 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession1][Headers={id=a60e5680-9025-b62a-1eb9-5f032e9f7997, timestamp=1450340138066}]
--- addSessionToQueue: testSession1
2015-12-17 09:15:38,268 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession2][Headers={id=1e6e2629-6c80-e6a7-7748-1be25aac4e02, timestamp=1450340138268}]
2015-12-17 09:15:38,318 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:38,349 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=1e6e2629-6c80-e6a7-7748-1be25aac4e02
2015-12-17 09:15:38,349 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession2][Headers={id=1e6e2629-6c80-e6a7-7748-1be25aac4e02, timestamp=1450340138268}]
--- addSessionToQueue: testSession2
2015-12-17 09:15:38,349 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession3][Headers={id=5ba804a1-a309-ed55-de9b-744e9b2f5c23, timestamp=1450340138349}]
2015-12-17 09:15:38,369 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=5ba804a1-a309-ed55-de9b-744e9b2f5c23
2015-12-17 09:15:38,379 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession3][Headers={id=5ba804a1-a309-ed55-de9b-744e9b2f5c23, timestamp=1450340138349}]
--- addSessionToQueue: testSession3
2015-12-17 09:15:38,379 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession4][Headers={id=58d85c60-4f43-3dbf-fe9d-dc4ab4853315, timestamp=1450340138379}]
2015-12-17 09:15:38,389 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=58d85c60-4f43-3dbf-fe9d-dc4ab4853315
2015-12-17 09:15:38,399 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession4][Headers={id=58d85c60-4f43-3dbf-fe9d-dc4ab4853315, timestamp=1450340138379}]
--- addSessionToQueue: testSession4
2015-12-17 09:15:38,399 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession5][Headers={id=75b03190-1dfd-9c32-8339-f23e1ba5afd6, timestamp=1450340138399}]
2015-12-17 09:15:38,409 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=75b03190-1dfd-9c32-8339-f23e1ba5afd6
2015-12-17 09:15:38,409 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession5][Headers={id=75b03190-1dfd-9c32-8339-f23e1ba5afd6, timestamp=1450340138399}]
--- addSessionToQueue: testSession5
2015-12-17 09:15:38,409 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession6][Headers={id=f7826aa2-d0f2-008e-9ed5-d8ab7a20a38d, timestamp=1450340138409}]
2015-12-17 09:15:38,429 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=f7826aa2-d0f2-008e-9ed5-d8ab7a20a38d
2015-12-17 09:15:38,429 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession6][Headers={id=f7826aa2-d0f2-008e-9ed5-d8ab7a20a38d, timestamp=1450340138409}]
--- addSessionToQueue: testSession6
2015-12-17 09:15:38,429 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession7][Headers={id=85daa925-bdba-eed3-84e2-31a131f9530f, timestamp=1450340138429}]
2015-12-17 09:15:38,439 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=85daa925-bdba-eed3-84e2-31a131f9530f
2015-12-17 09:15:38,449 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession7][Headers={id=85daa925-bdba-eed3-84e2-31a131f9530f, timestamp=1450340138429}]
--- addSessionToQueue: testSession7
2015-12-17 09:15:38,449 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession8][Headers={id=aca22ee7-4e04-be38-ef75-0b9ed241af4c, timestamp=1450340138449}]
2015-12-17 09:15:38,459 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=aca22ee7-4e04-be38-ef75-0b9ed241af4c
2015-12-17 09:15:38,469 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession8][Headers={id=aca22ee7-4e04-be38-ef75-0b9ed241af4c, timestamp=1450340138449}]
--- addSessionToQueue: testSession8
2015-12-17 09:15:38,469 [DEBUG] org.springframework.integration.channel.QueueChannel - preSend on channel 'sessionInboundChannel', message: [Payload String content=testSession9][Headers={id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:38,479 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=5ce08183-8026-53e6-9bf7-55e1a4905e53
2015-12-17 09:15:38,479 [DEBUG] org.springframework.integration.channel.QueueChannel - postSend (sent=true) on channel 'sessionInboundChannel', message: [Payload String content=testSession9][Headers={id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
--- addSessionToQueue: testSession9
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Message with id '5ce08183-8026-53e6-9bf7-55e1a4905e53' was deleted.
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.channel.QueueChannel - postReceive on channel 'sessionInboundChannel', message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Poll resulted in Message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.handler.BridgeHandler - org.springframework.integration.handler.BridgeHandler#0 received message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.handler.BridgeHandler - handler 'org.springframework.integration.handler.BridgeHandler#0' sending reply Message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.channel.ExecutorChannel - preSend on channel 'sessionOutboundChannel', message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,111 [DEBUG] org.springframework.integration.channel.ExecutorChannel - postSend (sent=true) on channel 'sessionOutboundChannel', message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:39,131 [DEBUG] org.springframework.integration.handler.ServiceActivatingHandler - ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@77954f89] received message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
--- handling started testSession9
2015-12-17 09:15:40,161 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
--- handling finished testSession9
2015-12-17 09:15:41,134 [DEBUG] org.springframework.integration.handler.ServiceActivatingHandler - handler 'ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@77954f89]' produced no reply for request Message: [Payload String content=testSession9][Headers={JdbcChannelMessageStore.SAVED=true, JdbcChannelMessageStore.CREATED_DATE=1450340138469, id=5ce08183-8026-53e6-9bf7-55e1a4905e53, timestamp=1450340138469}]
2015-12-17 09:15:41,194 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:42,235 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:43,256 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:44,277 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:45,298 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:46,320 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:47,341 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:48,363 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:49,385 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:50,406 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:51,427 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:52,448 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:53,469 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:54,490 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:55,522 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:56,556 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:57,577 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:58,609 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:15:59,641 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:00,672 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:01,703 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:02,724 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:03,745 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:04,776 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:05,797 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:06,821 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:07,852 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:08,874 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:09,896 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:10,920 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:11,952 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:12,973 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:13,994 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#0
2015-12-17 09:16:14,487 [DEBUG] org.springframework.integration.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - Removing {service-activator} as a subscriber to the 'sessionOutboundChannel' channel
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.channel.ExecutorChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@5dccce3c.sessionOutboundChannel' has 0 subscriber(s).
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#1
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.channel.PublishSubscribeChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@5dccce3c.errorChannel' has 0 subscriber(s).
2015-12-17 09:16:14,487 [INFO ] org.springframework.integration.endpoint.EventDrivenConsumer - stopped _org.springframework.integration.errorLogger
最佳答案
好吧,您没有提及任何自定义 ChannelInterceptor
,但这并不重要:根据您的日志我们看到
[DEBUG] org.springframework.integration.jdbc.store.JdbcChannelMessageStore - Inserting message with id key=
等等。
所以,一切都按预期进行。
我在此处复制我的评论以结束问题:
我不确定它应该如何工作:您将 QueueChannel
注入(inject) sessionInboundChannel
,但期望 ExecutorChannel executorChannel
。所以,看起来你在在这里发布之前修改了很多。因此,请在运行测试后分享整个 org.springframework.integration 类别的 DEBUG 。同时我没有发现您的配置有问题...
你的回答在这里没有意义。请删除它。
关于java - Spring Integration - 具有消息存储的队列 - 如何检查数据库中的持久消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34317376/
我的问题是如何在 python 中创建一个简单的数据库。我的例子是: User = { 'Name' : {'Firstname', 'Lastname'}, 'Address' : {'Street
我需要创建一个与远程数据库链接的应用程序! mysql 是最好的解决方案吗? Sqlite 是唯一的本地解决方案吗? 我使用下面的方法,我想知道它是否是最好的方法! NSString *evento
给定两台 MySQL 服务器,一台本地,一台远程。两者都有一个包含表 bohica 的数据库 foobar。本地服务器定义了用户 'myadmin'@'%' 和 'myadmin'@'localhos
我有以下灵活的搜索查询 Select {vt:code},{vt:productcode},{vw:code},{vw:productcode} from {abcd AS vt JOIN wxyz
好吧,我的电脑开始运行有点缓慢,所以我重置了 Windows,保留了我的文件。因为我的大脑还没有打开,所以我忘记事先备份我的 MySQL 数据库。我仍然拥有所有原始文件,因此我实际上仍然拥有数据库,但
如何将我的 Access 数据库 (.accdb) 转换为 SQLite 数据库 (.sqlite)? 请,任何帮助将不胜感激。 最佳答案 1)如果要转换 db 的结构,则应使用任何 DB 建模工具:
系统检查发现了一些问题: 警告:?:(mysql.W002)未为数据库连接“默认”设置 MySQL 严格模式 提示:MySQL 的严格模式通过将警告升级为错误来修复 MySQL 中的许多数据完整性问题
系统检查发现了一些问题: 警告:?:(mysql.W002)未为数据库连接“默认”设置 MySQL 严格模式 提示:MySQL 的严格模式通过将警告升级为错误来修复 MySQL 中的许多数据完整性问题
我想在相同的 phonegap 应用程序中使用 android 数据库。 更多说明: 我创建了 phonegap 应用程序,但 phonegap 应用程序不支持服务,所以我们已经在 java 中为 a
Time Tracker function clock() { var mytime = new Date(); var seconds
我需要在现有项目上实现一些事件的显示。我无法更改数据库结构。 在我的 Controller 中,我(从 ajax 请求)传递了一个时间戳,并且我需要显示之前的 8 个事件。因此,如果时间戳是(转换后)
我有一个可以收集和显示各种测量值的产品(不会详细介绍)。正如人们所期望的那样,显示部分是一个数据库+建立在其之上的网站(使用 Symfony)。 但是,我们可能还会创建一个 API 来向第三方公开数据
我们将 SQL Server 从 Azure VM 迁移到 Azure SQL 数据库。 Azure VM 为 DS2_V2、2 核、7GB RAM、最大 6400 IOPS Azure SQL 数据
我正在开发一个使用 MongoDB 数据库的程序,但我想问在通过 Java 执行 SQL 时是否可以使用内部数据库进行测试,例如 H2? 最佳答案 你可以尝试使用Testcontainers Test
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 已关闭 9 年前。 此问题似乎与 a specific programming problem, a sof
我正在尝试使用 MSI 身份验证(无需用户名和密码)从 Azure 机器学习服务连接 Azure SQL 数据库。 我正在尝试在 Azure 机器学习服务上建立机器学习模型,目的是我需要数据,这就是我
我在我的 MySQL 数据库中使用这个查询来查找 my_column 不为空的所有行: SELECT * FROM my_table WHERE my_column != ""; 不幸的是,许多行在
我有那个基地:http://sqlfiddle.com/#!2/e5a24/2这是 WordPress 默认模式的简写。我已经删除了该示例不需要的字段。 如您所见,我的结果是“类别 1”的两倍。我喜欢
我有一张这样的 table : mysql> select * from users; +--------+----------+------------+-----------+ | userid
我有表: CREATE TABLE IF NOT EXISTS `category` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL
我是一名优秀的程序员,十分优秀!