File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services:
1313 depends_on :
1414 - zookeeper
1515 ports :
16- - 29093 :29092
16+ - 29092 :29092
1717 environment :
1818 KAFKA_BROKER_ID : 1
1919 KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
Original file line number Diff line number Diff line change @@ -9,18 +9,19 @@ def __init__(self):
99
1010 self .running = True
1111
12- self .producer_thread = ProducerThread ("localhost:29093 " )
12+ self .producer_thread = ProducerThread ("localhost:29092 " )
1313
14- self .consumer_thread = ConsumerThread ("localhost:29093 " )
15- self .consumer_thread .add_topics ("test " , self .on_callback_test )
14+ self .consumer_thread = ConsumerThread ("localhost:29092 " )
15+ self .consumer_thread .add_topics ("analyse " , self .on_callback_test )
1616
1717 self .consumer_thread .start ()
1818 self .producer_thread .start ()
1919
2020
2121 def on_callback_test (self , topic , data ):
2222 print ("message receive : " , topic , data )
23- print ("a" )
23+
24+ self .producer_thread .send ("analyse_report" , "test" )
2425
2526 def run (self ):
2627
You can’t perform that action at this time.
0 commit comments