Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting hutch consumers fails within Rails Engine. #361

Open
pacso opened this issue Mar 9, 2021 · 0 comments
Open

Starting hutch consumers fails within Rails Engine. #361

pacso opened this issue Mar 9, 2021 · 0 comments

Comments

@pacso
Copy link

pacso commented Mar 9, 2021

I'm building a Rails Engine gem, which provides shared application code required by a number of microservices within our application. We're replacing our REST APIs which previously were used for inter-service communications with RabbitMQ using Hutch.

We've hit a problem when developing the integration within our gem though. When you try to start the consumers using the hutch cli script, it fails to start correctly.

If I start it within the gem root directory, hutch starts OK but doesn't detect any consumers:

2021-03-09T10:05:00Z 12408 INFO -- hutch booted with pid 12408
2021-03-09T10:05:00Z 12408 INFO -- connecting to rabbitmq (amqp://guest@127.0.0.1:5672/)
2021-03-09T10:05:00Z 12408 INFO -- connected to RabbitMQ at 127.0.0.1 as guest
2021-03-09T10:05:00Z 12408 INFO -- opening rabbitmq channel with pool size 1, abort on exception false
2021-03-09T10:05:00Z 12408 INFO -- using topic exchange 'hutch'
2021-03-09T10:05:00Z 12408 INFO -- HTTP API use is enabled
2021-03-09T10:05:00Z 12408 INFO -- connecting to rabbitmq HTTP API (http://guest@127.0.0.1:15672/)
2021-03-09T10:05:00Z 12408 INFO -- tracing is disabled
2021-03-09T10:05:00Z 12408 WARN -- no consumer loaded, ensure there's no configuration issue
2021-03-09T10:05:00Z 12408 INFO -- setting up queues

However, if I start hutch from within the test/dummy directory where the test rails app sits, it fails to start:

2021-03-09T10:05:15Z 12500 INFO -- hutch booted with pid 12500
2021-03-09T10:05:15Z 12500 INFO -- found rails project (.), booting app in development environment
2021-03-09T10:05:15Z 12500 INFO -- Requiring /Users/jon/code/project/test/dummy/config/environment.rb
/Users/jon/code/project/test/dummy/Gemfile not found

Has anybody got experience running hutch within a Rails Engine? Am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant