Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

rabbitmq pika username password

#!/usr/bin/env python
import pika

credentials = pika.PlainCredentials('the_user', 'the_pass')
parameters = pika.ConnectionParameters('132.45.23.14',
                                   5672,
                                   '/',
                                   credentials)

connection = pika.BlockingConnection(parameters)

channel = connection.channel()

channel.queue_declare(queue='hello', durable=Ture)

channel.basic_publish(exchange='',
                  routing_key='hello',
                  body='Hello W0rld!')
print(" [x] Sent 'Hello World!'")
connection.close()
Comment

PREVIOUS NEXT
Code Example
Python :: splitting a string and appending each character to a list python 
Python :: python launch file 
Python :: mean class accuracy sklearn 
Python :: python pickle example 
Python :: tkinter text in canvas 
Python :: gow to find a letter in a word in python 
Python :: how to delete everything on a file python 
Python :: leaky relu keras 
Python :: train test validation sklearn 
Python :: take off character in python string 
Python :: python transpose list 
Python :: python histogram as a dictionary 
Python :: how to average in python with loop 
Python :: tribonacci sequence python 
Python :: matplotlib add legend axis x 
Python :: char list 
Python :: python zip file open as text 
Python :: chrome selenium python 
Python :: remove characters in array of string python 
Python :: run code at the same time python 
Python :: how to replace a row value in pyspark dataframe 
Python :: python how to set multiple conditional for single var 
Python :: python delete the last line of console 
Python :: keras read image 
Python :: rangoli in python 
Python :: python webdriver element not interactable 
Python :: dataframe to dictionary without index 
Python :: python datetime subtract seconds 
Python :: pandas casting into integer 
Python :: convert every element in list to string python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =