Issue connecting RabbitMQ using collective.zamqp

Hi,

Having trouble adding RabbitMQ support with collective.zamqp package. Added everything required to the buildout.cfg as it was shown in example, but getting follow error:

2022-04-01T08:49:25 ERROR Zope.SiteErrorLog 1648799365.570.757291335619 http://localhost/superuser.ping
Traceback (innermost last):
  Module ZServer.ZPublisher.Publish, line 144, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZServer.ZPublisher.Publish, line 44, in call_object
  Module collective.zamqp.datatypes, line 97, in <lambda>
  Module collective.zamqp.keepalive, line 118, in ping
  Module collective.zamqp.producer, line 276, in publish
  Module zope.component._api, line 165, in getUtility
ComponentLookupError: (<InterfaceClass collective.zamqp.interfaces.ISerializer>, 'text/plain')

no clue where to dig for it. here is my buildout.cfg part:

[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8081
environment-vars =
    ZAMQP_LOGLEVEL DEBUG

zope-conf-additional =
    %import collective.taskqueue
    %import collective.zamqp
    <taskqueue />
    <taskqueue-server />
    <amqp-broker-connection>
        connection_id   superuser
        hostname        
        username        admin
        password        admin
        port            5672
        keepalive       60
    </amqp-broker-connection>
    <amqp-consuming-server>
        connection_id   superuser
        site_id         senaite
        user_id         admin
        port            8081
    </amqp-consuming-server>

[worker]
<= instance
http-address = 8085
zserver-threads = 1
environment-vars =
    ZAMQP_LOGLEVEL DEBUG

zope-conf-additional =
    %import collective.zamqp
    <amqp-broker-connection>
        connection_id   superuser
        hostname        
        port            5672
        username        admin
        password        admin
        heartbeat       120
        keepalive       60
    </amqp-broker-connection>
    <amqp-consuming-server>
        connection_id   superuser
        use_vhm         off
        site_id         senaite
        user_id         admin
        port            8081
    </amqp-consuming-server>

does anyone have nice sample how make this stuff work )

thank you!

This is not related to RabbitMQ or it's connection, but to find some internal object to text serializer.

It tries to use the Interfaces abstract factory to look up an utility to handle the input, based on the Zope Component Architecture (ZCA). But, and here I am out, collective.zamqp does not use the standard way to configure the components. Instead it uses a third party library called grok to register them. No idea what went wrong here.

we've finally figured out that the reason of this exception is grok.

here is our thread and solution:

Issue #17

1 Like