EventHubs

User avatar
Maggette
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Maggette »

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...
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

well, mag, that is a decent offer you're offering. Let me see if I can muster up the energy right now....will revert.



edit: I posted the code for the client. it barfs on binding on the server.
Chiral is Tyler Durden
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

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);

}



}

}
Chiral is Tyler Durden
User avatar
Maggette
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Maggette »

Hence you jump into

"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...
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

this.



[img]/User%20Files/14/Screen%20Shot%202016-05-29%20at%2021.15.12.png[/img]



not exactly revealing, to me at least. Is it the "cunt" thing?
Chiral is Tyler Durden
User avatar
Maggette
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Maggette »

"not exactly revealing, to me at least"



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...
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

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
Chiral is Tyler Durden
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

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?
Chiral is Tyler Durden
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

nevermind, found out how to setup firewall rules.
Chiral is Tyler Durden
User avatar
Nonius
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

EventHubs

Post by Nonius »

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
Post Reply