Java Code Examples for org.apache.rocketmq.store.MessageExtBrokerInner#putUserProperty()
The following examples show how to use
org.apache.rocketmq.store.MessageExtBrokerInner#putUserProperty() .
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: MessageStoreWithFilterTest.java From DDMQ with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags(System.currentTimeMillis() + "TAG"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 2
Source File: MessageStoreWithFilterTest.java From DDMQ with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }
Example 3
Source File: MessageStoreWithFilterTest.java From rocketmq-4.3.0 with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags(System.currentTimeMillis() + "TAG"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 4
Source File: MessageStoreWithFilterTest.java From rocketmq-4.3.0 with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }
Example 5
Source File: MessageStoreWithFilterTest.java From rocketmq-read with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags(System.currentTimeMillis() + "TAG"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 6
Source File: MessageStoreWithFilterTest.java From rocketmq-read with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }
Example 7
Source File: MessageStoreWithFilterTest.java From DDMQ with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags(System.currentTimeMillis() + "TAG"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 8
Source File: MessageStoreWithFilterTest.java From DDMQ with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }
Example 9
Source File: MessageStoreWithFilterTest.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags("TAG1"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 10
Source File: MessageStoreWithFilterTest.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }
Example 11
Source File: MessageStoreWithFilterTest.java From rocketmq with Apache License 2.0 | 6 votes |
public MessageExtBrokerInner buildMessage() { MessageExtBrokerInner msg = new MessageExtBrokerInner(); msg.setTopic(topic); msg.setTags(System.currentTimeMillis() + "TAG"); msg.setKeys("Hello"); msg.setBody(msgBody); msg.setKeys(String.valueOf(System.currentTimeMillis())); msg.setQueueId(queueId); msg.setSysFlag(0); msg.setBornTimestamp(System.currentTimeMillis()); msg.setStoreHost(StoreHost); msg.setBornHost(BornHost); for (int i = 1; i < 3; i++) { msg.putUserProperty(String.valueOf(i), "imagoodperson" + i); } msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); return msg; }
Example 12
Source File: MessageStoreWithFilterTest.java From rocketmq with Apache License 2.0 | 6 votes |
protected List<MessageExtBrokerInner> putMsg(DefaultMessageStore master, int topicCount, int msgCountPerTopic) throws Exception { List<MessageExtBrokerInner> msgs = new ArrayList<MessageExtBrokerInner>(); for (int i = 0; i < topicCount; i++) { String realTopic = topic + i; for (int j = 0; j < msgCountPerTopic; j++) { MessageExtBrokerInner msg = buildMessage(); msg.setTopic(realTopic); msg.putUserProperty("a", String.valueOf(j * 10 + 5)); msg.setPropertiesString(MessageDecoder.messageProperties2String(msg.getProperties())); PutMessageResult result = master.putMessage(msg); msg.setMsgId(result.getAppendMessageResult().getMsgId()); msgs.add(msg); } } return msgs; }