tobby48 2 years ago
parent
commit
d9759cf2bc

+ 2
- 2
src/main/python/kr/co/swh/lecture/opensource/rabbitmq/receive.py View File

2
 
2
 
3
 class Consumer: 
3
 class Consumer: 
4
     def __init__(self): 
4
     def __init__(self): 
5
-        self.__url = 'dev-swh.ga' 
5
+        self.__url = '183.99.87.90' 
6
         self.__port = 5672 
6
         self.__port = 5672 
7
         self.__vhost = '/' 
7
         self.__vhost = '/' 
8
         self.__cred = pika.PlainCredentials('guest', 'guest') 
8
         self.__cred = pika.PlainCredentials('guest', 'guest') 
9
-        self.__queue = 'py'; 
9
+        self.__queue = 'haeun'; 
10
     
10
     
11
     def on_message(channel, method_frame, header_frame, body): 
11
     def on_message(channel, method_frame, header_frame, body): 
12
         print('Received %s' % body.decode()) 
12
         print('Received %s' % body.decode()) 

+ 2
- 2
src/main/python/kr/co/swh/lecture/opensource/rabbitmq/send.py View File

2
 
2
 
3
 class Publisher: 
3
 class Publisher: 
4
     def __init__(self): 
4
     def __init__(self): 
5
-        self.__url = 'dev-swh.ga' 
5
+        self.__url = '183.99.87.90' 
6
         self.__port = 5672 
6
         self.__port = 5672 
7
         self.__vhost = '/' 
7
         self.__vhost = '/' 
8
         self.__cred = pika.PlainCredentials('guest', 'guest') 
8
         self.__cred = pika.PlainCredentials('guest', 'guest') 
9
-        self.__queue = 'py'; 
9
+        self.__queue = 'haeun'; 
10
         
10
         
11
     def main(self): 
11
     def main(self): 
12
         conn = pika.BlockingConnection(pika.ConnectionParameters(self.__url, self.__port, self.__vhost, self.__cred)) 
12
         conn = pika.BlockingConnection(pika.ConnectionParameters(self.__url, self.__port, self.__vhost, self.__cred))