Hello

I'm building a simple app to connect filesystem with magento (using rest
API). I have 2 flows:

- read stock.txt -> parse stock -> send updated stock to magento
- read periodically orders from magento -> map to object -> write file to
orders.xml

How I currently solve this is:

- use file component to read stock.txt -> bindy to parse csv -> bean to
update magento
- timer with period -> bean to read orders -> xml marshal -> use file
component to write

This works, but I feel like it's not correct. My next goal is to replace
magento beans with magento endpoint. So I can write

- use file component to read stock.txt -> bindy to parse csv -> to endpoint
magento with method updatestock
- from magento orders read periodically -> xml marshal -> file component to
write

The flow looks much more clear. But is this correct way?

If I implement this as an endpoint, then if I want to support all methods
(magento rest calls) in Producer and Consumer, code becomes huge and it's
not nicely separated as with beans. But on the other hand, it looks more
correct from flow point-of-view. Other idea is to have multiple endpoints
(magento-orders, magento-stocks, ..).

What is the correct way to implement this?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Implementing-custom-endpoint-with-multiple-methods-or-custom-beans-tp5793884.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to