Commit 78d7f10d authored by Federico Sismondi's avatar Federico Sismondi

changed default exchanged default->amq.topic

parent ea78cdd9
......@@ -76,9 +76,9 @@ For more information, visit: http://doc.f-interop.eu
self.session_url = click.Option(
param_decls=["--url"],
default="amqp://guest:guest@localhost/default",
default="amqp://guest:guest@localhost/",
required=True,
help="")
help="AMQP url provided by F-Interop")
self.name_option = click.Option(
param_decls=["--name"],
......
......@@ -10,11 +10,11 @@ from kombu import Exchange
from kombu import Queue
from kombu.mixins import ConsumerMixin
DEFAULT_EXCHANGE_NAME = "default"
DEFAULT_EXCHANGE_NAME = "amq.topic"
class BaseConsumer(ConsumerMixin):
DEFAULT_EXCHANGE_NAME = "default"
DEFAULT_EXCHANGE_NAME = "amq.topic"
def __init__(self, user, password, session, server, name, consumer_name):
"""
......@@ -24,7 +24,8 @@ class BaseConsumer(ConsumerMixin):
password: User password
session: Test session
server: Backend for the RMQ
name: Identity of the component. Can be an UUID or a human nickname
exchange: RMQ exchange for sending messages
name: Identity of the agent. Used by testing tools to identify/differentiate each agent on the session
consumer_name: Name to easily identify a process consuming.
"""
self.log = logging.getLogger(__name__)
......@@ -37,9 +38,9 @@ class BaseConsumer(ConsumerMixin):
self.name = name
self.consumer_name = consumer_name
self.server_url = 'amqp://{user}:{password}@{server}/{session}'.format(user=user,
password=password,
session=session,
server=server)
password=password,
session=session,
server=server)
self.connection = Connection(self.server_url,
transport_options={'confirm_publish': True})
......
......@@ -325,14 +325,14 @@ class OpenTunLinux(object):
Class which interfaces between a TUN virtual interface and an EventBus.
"""
def __init__(self, name, rmq_connection, exchange="default",
def __init__(self, name, rmq_connection, exchange="amq.topic",
ipv6_prefix=None, ipv6_host=None, ipv6_no_forwarding = None,
ipv4_host=None, ipv4_network=None, ipv4_netmask=None):
# RMQ setups
self.connection = rmq_connection
self.producer = self.connection.Producer(serializer='json')
self.exchange = Exchange(exchange, type="topic", durable=False)
self.exchange = Exchange(exchange, type="topic", durable=True)
self.name = name
self.packet_count = 0
......@@ -549,14 +549,14 @@ class OpenTunMACOS(object):
Class which interfaces between a TUN virtual interface and an EventBus.
'''
def __init__(self, name, rmq_connection, exchange="default",
def __init__(self, name, rmq_connection, exchange="amq.topic",
ipv6_prefix=None, ipv6_host=None, ipv6_no_forwarding = None,
ipv4_host=None, ipv4_network=None, ipv4_netmask=None):
# RMQ setups
self.connection = rmq_connection
self.producer = self.connection.Producer(serializer='json')
self.exchange = Exchange(exchange, type="topic", durable=False)
self.exchange = Exchange(exchange, type="topic", durable=True)
self.name = name
self.tun_name = ''
......
......@@ -9,7 +9,7 @@ class RabbitMQHandler(logging.Handler):
Example setup::
handler = RabbitMQHandler('amqp://guest:guest@localhost')
"""
def __init__(self, url, name, exchange="default"):
def __init__(self, url, name, exchange="amq.topic"):
logging.Handler.__init__(self)
self.connection = pika.BlockingConnection(pika.URLParameters(url))
self.channel = self.connection.channel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment