Provides basic ESB services to transfer data between applications.
A simple ESB application that can be used for Application Integration. This ESB is simple and uses the concept(s) of an itineray which contains on-ramp(s), transform(s), off-ramp(s) and message events. An on-ramp is an entry point onto the bus, likewise an off-ramp is an exit point off of the bus. A transformation is the reorganization of the message that was received on the bus into a new format. Finally, a message event is used to link the itinerary artifacts together (on-ramp, off-ramp, transform). The following features are currently supported.
- Amazon SQS
- Amazon SQS
Currently the ESB is only designed to work with JSON data. All messages must be in a JSON format when they leave the on-ramp into the bus.
The sample illustrates using the SimpleESB to transfer orders from a front end e-commerce website to a backend order fulfillment system.
var SimpleESB = require'simpleesb';var yourmap = require'../transforms/yourmap';exportsitinerary =OnRampSqsOnRamppublishAs'onramp::test'providerSimpleESBSqsClientProviderautoConfigurequeue'/054218599934/Test'TransformprovideryourmapcreateMapsubscribeTo'onramp::test'publishAs'transformed::test'OffRampHttpOffRampsubscribeTo'transformed::test'HttpMethod'POST'Destination'';
var SimpleESB = require'simpleesb';varreturnfield'*' 'status' return 'PENDING';field'created_at' 'createdOn'field'payment.po_number' 'masterOrderNumber'field'shipping_address.street' 'shipAddress'field'shipping_address.city' 'shipCity'field'shipping_address.region' 'shipState'field'shipping_address.postcode' 'shipPostalCode'field'*' 'shipTo' return sourceshipping_addressfirstname + ' ' + sourceshipping_addresslastname;field'customer_email' 'shipEmail'field'shipping_address.telephone' 'shipPhone'field'' 'shipMethod'field'customer_email' 'userEmail'field'' 'facilityName'collection'items' 'details'field'discount_amount' 'discount'field'row_total' 'lineTotal'field'qty_ordered' 'quantity'field'price' 'salePrice'field'tax_amount' 'salesTax'field'price' 'unitPrice'field'sku' 'sku';;moduleexportscreateMap = yourmap;
To run the Simple ESB you can simply add the following to your application startup routine.