Skip to content

Commit

Permalink
cloudevents/eventmesh message protocol pub/sub for sdk in rocketmq-co…
Browse files Browse the repository at this point in the history
…nnector (apache#629)

* fix cloudevents/eventmesh message protocol pub/sub for sdk in rocketmq-connector
  • Loading branch information
xwm1992 authored Dec 7, 2021
1 parent eaef797 commit 3b82ce6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static MessageReader createReader(final Map<String, String> props,
throws CloudEventRWException {

return MessageUtils.parseStructuredOrBinaryMessage(
() -> props.get(RocketMQHeaders.CONTENT_TYPE),
format -> new GenericStructuredMessageReader(format, body),
() -> null,
format -> null,
() -> props.get(RocketMQHeaders.SPEC_VERSION),
sv -> new RocketMQBinaryMessageReader(sv, props, body)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public static void main(String[] args) throws Exception {
.idc("idc")
.ip(IPUtils.getLocalAddress())
.sys("1234")
.pid(String.valueOf(ThreadUtils.getPID())).build();
.pid(String.valueOf(ThreadUtils.getPID()))
.userName("eventmesh")
.password("pass")
.build();

try (EventMeshHttpProducer eventMeshHttpProducer = new EventMeshHttpProducer(eventMeshClientConfig)) {
for (int i = 0; i < messageSize; i++) {
Expand Down

0 comments on commit 3b82ce6

Please sign in to comment.