1

When working with text-based EDI X12 Message payloads (such as http://examples.x12.org/) over straight TCP, over HTTP, or SOAP, or other transport protocols, does anyone have examples or words of wisdom around either:

1) using netty for simple transport protocol frame encoding (so TCP STX/ETX framing, HTTP framing) then forwarding the raw payload to another tool such as Smooks for parsing/marshalling. (if there are alternatives other than smooks, please share!)

2) or using Netty and a custom created codec to parse the sophisticated looping contents (segments, fields, components, etc).

It seems possible in either scenario, but looking for sufficient performance (1000 messages/sec), low latency (10ms or lower), low-latency markers such as minimal GC, and if you create a codec or parser/marshaller is it portable to other transport protocols/other (java) systems.

Part of the ignorance/confusion is codecs vs marshallers/parsers for the messages, particularly when the message could transport directly over TCP.

Thanks for any guidance!

dhartford
  • 11
  • 2

1 Answers1

0

To answer my own question: Went with a Camel solution where netty4-http is an endpoint (for HTTP framing), and smooks (as a camel data format) for EDI payload parsing.

Smooks seems to be in the 20-40ms latency range on EDI-to-Java unmarshal impl for an ~1.5kb size X12 payload. Marshaling I used the direct writer from the java object, as using marshal on a smooks camel dataformat did not function.

Although higher latency, very quick to setup the edi xml file mapping and using maven-ejc plugin to create the java binding object from the edi xml. For quick turnaround, versus long-term runtime performance, pretty good tradeoff for my scenario.

dhartford
  • 1,125
  • 2
  • 12
  • 35