Skip to content

Instantly share code, notes, and snippets.

@rufer7
Last active August 29, 2015 14:18
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 rufer7/3e691a15ed77f96f7282 to your computer and use it in GitHub Desktop.
Save rufer7/3e691a15ed77f96f7282 to your computer and use it in GitHub Desktop.
Custom header enricher, which returns the headers to add to messages
package be.rufer.amqp.integration.messaging.enricher;
import org.springframework.integration.Message;
import java.util.HashMap;
import java.util.Map;
public class SampleHeaderEnricher {
public Map<String, Object> addCustomHeaders(Message<?> message) {
Map<String, Object> headersToEnrich = new HashMap<>();
headersToEnrich.put("CUSTOM_HEADER_KEY", "CUSTOM_HEADER_VALUE");
return headersToEnrich;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment