org.apache.rocketmq.broker.mqtrace.ConsumeMessageContext Java Examples
The following examples show how to use
org.apache.rocketmq.broker.mqtrace.ConsumeMessageContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PullMessageProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #2
Source File: SendMessageProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
static private ConsumeMessageContext buildConsumeMessageContext(String namespace, ConsumerSendMsgBackRequestHeader requestHeader, RemotingCommand request) { ConsumeMessageContext context = new ConsumeMessageContext(); context.setNamespace(namespace); context.setConsumerGroup(requestHeader.getGroup()); context.setTopic(requestHeader.getOriginTopic()); context.setCommercialRcvStats(BrokerStatsManager.StatsType.SEND_BACK); context.setCommercialRcvTimes(1); context.setCommercialOwner(request.getExtFields().get(BrokerStatsManager.COMMERCIAL_OWNER)); return context; }
Example #3
Source File: SendMessageProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #4
Source File: PullMessageProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #5
Source File: SendMessageProcessor.java From rocketmq_trans_message with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #6
Source File: PullMessageProcessor.java From rocketmq_trans_message with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #7
Source File: SendMessageProcessor.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #8
Source File: PullMessageProcessor.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #9
Source File: SendMessageProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #10
Source File: PullMessageProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #11
Source File: SendMessageProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #12
Source File: PullMessageProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #13
Source File: SendMessageProcessor.java From rocketmq-read with Apache License 2.0 | 5 votes |
/** * 执行消费勾子 * @param context ; */ public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #14
Source File: PullMessageProcessor.java From rocketmq-read with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageBefore(context); } catch (Throwable e) { //; } } } }
Example #15
Source File: SendMessageProcessor.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { // 客户可以实现自己的消费消息后的钩子方法 hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }
Example #16
Source File: PullMessageProcessor.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookBefore(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { // 用户可以实现自己在消费之前的钩子方法 hook.consumeMessageBefore(context); } catch (Throwable e) { } } } }
Example #17
Source File: SendMessageProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public void executeConsumeMessageHookAfter(final ConsumeMessageContext context) { if (hasConsumeMessageHook()) { for (ConsumeMessageHook hook : this.consumeMessageHookList) { try { hook.consumeMessageAfter(context); } catch (Throwable e) { // Ignore } } } }