Console Script - RabbitMQ Pika - 'module' object has no attribute 'SOMAXCONN'

Hi Team,

I am using Ignition 8 and trying to read the data from tags and send it to RabbitMQ queue using pika library.

But when I try to establish a connection using python Pika library it return error as
‘module’ object has no attribute ‘SOMAXCONN’

The script runs fine when executed independently outside the Ignition environment, but the same script fails when executed on Tag or Console script with above error.

Could you please suggest?

mport pika;
import sys


credentials = pika.PlainCredentials('xxxx', 'xxxx')
parameters = pika.ConnectionParameters('',5672,'/',credentials)
connection = pika.BlockingConnection(parameters)

Did someone find out what’s the problem?

Actually I found we can add that “SOMAXCONN = 128” in in jython lib manually.
However pika didn’t work in ignition

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\jython2.7.2\Lib\site-packages\pika\adapters\", line 359, in __init__
    self._impl = self._create_connection(parameters, _impl_class)
  File "C:\jython2.7.2\Lib\site-packages\pika\adapters\", line 450, in _create_connection
    raise self._reap_last_connection_workflow_error(error)

Maybe you already knew, I just found that you can use the “amqp-client-5.9.0.jar” to talk with RabbitMQ