Issue Details (XML | Word | Printable)

Key: OCESPER-12
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tomas Lukosius
Reporter: Jonas Partner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenCredo Esper

Reduce configuration needed for inbound channel adapter in simple case

Created: 19/Feb/10 11:21 AM   Updated: 21/Feb/11 12:02 PM
Component/s: EsperSpringIntegrationSupport
Affects Version/s: 2.0
Fix Version/s: 2.1

Time Tracking:
Original Estimate: 1 day
Original Estimate - 1 day
Remaining Estimate: 1 day
Remaining Estimate - 1 day
Time Spent: Not Specified
Remaining Estimate - 1 day


 Description  « Hide
Currently the inbound channel adapter is plugged in to an EsperTemplate as an update listener. Where I simply want to connect an Esper query I would expect the adapter to be capable of creating a default template so the below should work.

<inbound-channel-adapter channel="channelToPublishTo">
<esper-query sourceId="indicateWhereTheEventCameFrom">select * from X</esper-query>
</inbound-channel-adapter>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tomas Lukosius added a comment - 19/Aug/10 10:26 AM
Changed assignee and fix version.

Tomas Lukosius added a comment - 21/Aug/10 10:34 AM
Inbound adapter creates EsperTemplate and listens for events specified in <si-esper:epl>:

<si-esper:inbound-channel-adapter id="inboundGateway" channel="inboundRawEsperMessages" template-name="testTemplate">
<si-esper:epl>select * from org.opencredo.esper.integration.MessageContext</si-esper:epl>
</si-esper:inbound-channel-adapter>

Note1: attribute "template-name" is useful when you need to create EsperTamplate with name, so next snipped is valid too:
....
<si-esper:inbound-channel-adapter id="inboundGateway" channel="inboundRawEsperMessages" template-name="testTemplate">
<si-esper:epl>select * from org.opencredo.esper.integration.MessageContext</si-esper:epl>
</si-esper:inbound-channel-adapter>

<esper:template id="testTemplate">
<esper:statements></esper:statements>
</esper:template>
....

Now it is possible to add events to template bean "testTemplate" and inbound-channel-adapter with id "inboundGateway" will react to events on those events.

Note2:
<si-esper:epl> - is optional, if it is not specified <si-esper:inbound-channel-adapter ..> becomes unmatched listener.