Select to view content in your preferred language

Output Push JSON Array to external website

1054
5
01-25-2019 09:45 AM
RomanChueh
Occasional Contributor

Is there any way to configure Push JSON to an External Website output to buffer the GeoEvents, similar to "Add a Feature" or "Update a Feature" output, before sending to the External Website?

I need an output that will support high throughput (at least 1000+ event/sec), so instead of sending one GeoEvent at a time, I am looking for a way to send multiple GeoEvent to my client.  Is there any alternative?

0 Kudos
5 Replies
Stefan_Jung
Esri Contributor

Hey,

i don't see any option to configure the connector to buffer the events.


But it is always possible to develop your own output adapter which sends the JSON as batch. The transporter can still be the existing WebSocket Transport.

Best,

Stefan

0 Kudos
RomanChueh
Occasional Contributor

Thanks Stefan.  Your suggestion gave me an idea to resolve my problem.  

I am getting the JSON array by doing the following:

1. Create a new output connector by cloning the Push JSON to an External Website output connector, and change Adapter from Generic-JSON to JSON

2. Create a new GeoEvent Output using the new output connector

3. Enter a time value into "Update Interval (Seconds)" properties.

0 Kudos
RomanChueh
Occasional Contributor

Upon further investigation, the generated JSON Array has incorrect format; it's missing an ending curly braces "}" at the end of each GeoEvent.

Any Suggestion?

0 Kudos
Stefan_Jung
Esri Contributor

Hey,

I know that geoevent is not closing an array bracket while writing json to a file output. Because it is still waiting for more events to write to the json output list. Not sure if this could be a similar behavoir. Looks more like a bug in this case.

Do you have any error messages @ log file?

Is the JSON correct when sending it to a different output for example via TCP to the GeoEvent logger?

Best,

Stefan

0 Kudos
RomanChueh
Occasional Contributor

Sorry about the delay response. 

I am now able to get a complete JSON Array send to the Client service.   As it turns out, the problem was not in the GeoEvent, but within the logging component Client service, which mysteriously remove one of the closing bracelet after the each event. 

Thanks for you help, Stefan.

Roman

0 Kudos