Skip to content

Starting hutch consumers fails within Rails Engine. #361

Open
@pacso

Description

@pacso

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pacso

        Issue actions

          Starting `hutch` consumers fails within Rails Engine. · Issue #361 · ruby-amqp/hutch