queue icon indicating copy to clipboard operation
queue copied to clipboard

Manage queue types across environments

Open stevenscg opened this issue 9 years ago • 2 comments

This is just a general question regarding the project's view of how queue types should be managed across (or between) various deployment environments.

I've noticed that some queue abstraction libraries allow producers and consumers to operate against a "well-known" queue by name (or similar) independent of the underlying adapter.

For example, this allows producers and consumers to operate against a simple database table "queue" in a developer or CI environment while using SQS in the fully-deployed scenario.

I'm not sure that is possible or even a good idea, but it is a pattern that seems to exist.

Thoughts? Recommendations?

stevenscg avatar Feb 08 '16 16:02 stevenscg

@h-bragg got any input here?

I personally think it'd add unnecessary complexity to the library, and enable something that a decent framework would handle anyway with environment based configuration and a service container.

sjparkinson avatar Feb 09 '16 10:02 sjparkinson

I agree that it would add complexity to the library. But could be something to consider in the future; I see https://github.com/eventio/bbq main interface is a layer above the queue, so you can access and push to multiple queues with a single class.

The first thing I can think of, with limiting any environment checks in code, would be to have an QueueAdapterFactory that supports queue name resolution like: s3:queue_name. This should probably sit in your code base as it would require the s3 client/others, etc.

h-bragg avatar Feb 09 '16 11:02 h-bragg