Skip to content

Instantly share code, notes, and snippets.

@matzew
Created January 15, 2019 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matzew/a3ab04c065140442e83c09c6191a209b to your computer and use it in GitHub Desktop.
Save matzew/a3ab04c065140442e83c09c6191a209b to your computer and use it in GitHub Desktop.
@ApplicationScoped
public class MyCloudEventProcessor {
@Incoming("from-http")
@Outgoing("to-http")
public HttpMessage<CloudEventMessage> process(CloudEventMessage<String> message) {
return HttpMessage.HttpMessageBuilder.<CloudEventMessage>create()
.withMethod("PUT")
.withPayload(message)
.withHeader("Content-Type", "application/cloudevents+json")
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment