Skip to main content

I would like to write a feature class from an enterprise geodatabase to ActiveMQ. What is the best way to convert the feature class to JSON and write the JSON to ActiveMQ?

I think you want to check out the JMSSender transformer. I've never used it but it looks like it's supported for ActiveMQ: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Working_with_JMS/Configuring_JMS_Provider.htm

I would try get this connection running with simple messages and then look into how to create the GeoJOSN.


You can use the JSONTemplater to generate a JSON document based on almost any kind of input.

Concerning ActiveMQ, you can try using the JMSSender. An alternative would be to use the REST API of the ActiveMQ server and send the JSON document with the HTTPCaller transformer.


I had tried using a JSONWriter to create the JSON and the JMSSender. I have not been able to figure out how to use the JMSSender to copy the JSON file to ActiveMQ. The JSONWriter is creating a JSON file and I can use JMSSender to send a location to the JSON or other information from the JSON but I have not been able to actually send the entire JSON file.


You can use the JSONTemplater to generate a JSON document based on almost any kind of input.

Concerning ActiveMQ, you can try using the JMSSender. An alternative would be to use the REST API of the ActiveMQ server and send the JSON document with the HTTPCaller transformer.

I had tried using a JSONWriter to create the JSON and the JMSSender. I have not been able to figure out how to use the JMSSender to copy the JSON file to ActiveMQ. The JSONWriter is creating a JSON file and I can use JMSSender to send a location to the JSON or other information from the JSON but I have not been able to actually send the entire JSON file.


I had tried using a JSONWriter to create the JSON and the JMSSender. I have not been able to figure out how to use the JMSSender to copy the JSON file to ActiveMQ. The JSONWriter is creating a JSON file and I can use JMSSender to send a location to the JSON or other information from the JSON but I have not been able to actually send the entire JSON file.

I'd skip using the JSON writer, just use the JSONTemplater to get a JSON document that is contained in a regular attribute, which you can then either send to the JMSSender or the HTTPCaller, depending on what you prefer. That way there are no intermediary files.

 

Regarding the JMSSender, you'll have to carefully study the documentation, the setup isn't trivial if you're not familiar with JMS. You may also want to enlist the help of your colleague responsible for the ActiveMQ instance you're connecting to.


I had tried using a JSONWriter to create the JSON and the JMSSender. I have not been able to figure out how to use the JMSSender to copy the JSON file to ActiveMQ. The JSONWriter is creating a JSON file and I can use JMSSender to send a location to the JSON or other information from the JSON but I have not been able to actually send the entire JSON file.

Yes, that sounds like a better option. I will give the JSONTemplater a try.

Thanks for your help.


Reply