2

I am working on an Apace Camel 3 component that interfaces the api of some sort of hardware. My implementation works fine in my small tests. But I am stumpleing about the point that Endpoints should be singleton.

From my point of view the singleton pattern makes no sense for my component, because in a route I might have Endpoints of my component to multiple devices with different ips/logins. So beeing singleton for me would make more use based on the Endpoints URI.

Which leads me to the next point - within such a device I have subdevices - at the moment I address subdevices via the query part. But when talking about being singleton based on the URI the addressing of the subdevices should better become part of the URI path. Then it would make sense to be singleton based on the uri authority and path (which is not really being singleton as the original pattern states).

So my question is what does it exactly(!) mean for an Apache Camel 3 components endpoint to be singleton or not?

PowerStat
  • 3,757
  • 8
  • 32
  • 57

0 Answers0