EventHubs
- Maggette
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
That was just the first number that came to my mind (for obvious reason
). If it doesn't work, please elaborate a little bit of what happens (if anything happens)..errors, call stack, etc.
Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
server side looks like this:
public class SentimentPublisher
{
SentimentMeasurementContainer smc;
PublisherSocket pub = new PublisherSocket()
public SentimentPublisher(SentimentMeasurementContainer smc)
{
this.smc = smc;
this.AddSentimentHandler();
try
{
pub.Bind(@"tcp://xxx.xxx.xxx.xxx:5556");
}
catch
{
throw new Exception("cunt");
}
}
public void Test()
{
try
{
pub.SendMoreFrame("Trump").SendFrame("Fuck");
}
catch
{
throw new Exception("Can't Publish");
}
}
public void ReceiveSentiment(object sender, EventArgs e)
{
SentimentPacket sp = (SentimentPacket)e;
pub.SendMoreFrame(sp.keyword).SendFrame(Convert.ToString(sp.sentiment+": "+sp.tweet));
}
public void AddSentimentHandler()
{
foreach (var x in smc.TheMeasurements)
{
x.Value.AddEventHandler(this.ReceiveSentiment);
}
}
}
public class SentimentPublisher
{
SentimentMeasurementContainer smc;
PublisherSocket pub = new PublisherSocket()
public SentimentPublisher(SentimentMeasurementContainer smc)
{
this.smc = smc;
this.AddSentimentHandler();
try
{
pub.Bind(@"tcp://xxx.xxx.xxx.xxx:5556");
}
catch
{
throw new Exception("cunt");
}
}
public void Test()
{
try
{
pub.SendMoreFrame("Trump").SendFrame("Fuck");
}
catch
{
throw new Exception("Can't Publish");
}
}
public void ReceiveSentiment(object sender, EventArgs e)
{
SentimentPacket sp = (SentimentPacket)e;
pub.SendMoreFrame(sp.keyword).SendFrame(Convert.ToString(sp.sentiment+": "+sp.tweet));
}
public void AddSentimentHandler()
{
foreach (var x in smc.TheMeasurements)
{
x.Value.AddEventHandler(this.ReceiveSentiment);
}
}
}
Chiral is Tyler Durden
- Maggette
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
Hence you jump into
"throw new Exception("cunt")" ?
What doe sthe exception say (other than "cunt"
)
"throw new Exception("cunt")" ?
What doe sthe exception say (other than "cunt"
Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...
- Maggette
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
"not exactly revealing, to me at least"
Same here, sorry...your ZeroMQ seems fine (code wise..."pretty hello wordish").
Same here, sorry...your ZeroMQ seems fine (code wise..."pretty hello wordish").
Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
finally got it to work, by the way. stupid mistake about the IP address.
just trying a python case and it don't work.
__author__ = 'god'
from socket import socket
import zmq
import sys
# Socket to talk to server
context = zmq.Context()
socket = context.socket(zmq.SUB)
print "Collecting updates from NoniusRe..."
socket.connect ("tcp://66.666.66.666:8080")
topicfilter = "Trump"
socket.setsockopt(zmq.SUBSCRIBE, topicfilter)
# Process 5 updates
total_value = 0
for i in range(0,100):
string = socket.recv()
topic, messagedata = string.split()
print topic, messagedata
just trying a python case and it don't work.
__author__ = 'god'
from socket import socket
import zmq
import sys
# Socket to talk to server
context = zmq.Context()
socket = context.socket(zmq.SUB)
print "Collecting updates from NoniusRe..."
socket.connect ("tcp://66.666.66.666:8080")
topicfilter = "Trump"
socket.setsockopt(zmq.SUBSCRIBE, topicfilter)
# Process 5 updates
total_value = 0
for i in range(0,100):
string = socket.recv()
topic, messagedata = string.split()
print topic, messagedata
Chiral is Tyler Durden
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
by the way, I put a subscriber in a .NET project that was published to an azure website. it doesn't work on the website. I presume I'd need to set some azure firewall rule or something like that? anyone had this issue?
Barracuda WAF Cloud Service?
Barracuda WAF Cloud Service?
Chiral is Tyler Durden
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
EventHubs
what a nightmare. in Powershell, am able to setup a NetworkSecurityGroup. then set up a Virtual Network. both show up as existing. Then trying to assign the NetworkSecurityGroup to the virtual network. it's saying that virtual network doesn't exist!
Chiral is Tyler Durden