Search Results

Search found 21160 results on 847 pages for 'message'.

Page 4/847 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • send c++ structure to msmq message

    - by Gobalakrishnan
    C++ Code: typedef struct { char cfiller[7]; short MsgCode; char cfiller1[11]; short MsgLength; char cfiller2[2]; }Message ; I want to send the above structure as a msmq message I am able to send string to msmq but it is giving error to send the above structure. thank you

    Read the article

  • unix message queue

    - by Betamoo
    Is there an ipc option to get the last message in message queue but not removing it? I want this to allow many clients reading same messages from the same server.. Thanks

    Read the article

  • persistant message queues

    - by Will
    I have several services on different machines and a message-passing system suits my problem. Reliability - sent messages always delivered, even if one end goes down - is the key concern, although it should also be fast and reasonably bandwidth-efficient. So which message queue should I use?

    Read the article

  • AWS .NET SDK v2: the message-pump pattern

    - by Elton Stoneman
    Originally posted on: http://geekswithblogs.net/EltonStoneman/archive/2013/10/11/aws-.net-sdk-v2--the-message-pump-pattern.aspxVersion 2 of the AWS SDK for .NET has had a few pre-release iterations on NuGet and is stable, if a bit lacking in step-by-step guides. There’s at least one big reason to try it out: the SQS queue client now supports asynchronous reads, so you don’t need a clumsy polling mechanism to retrieve messages. The new approach  is easy to use, and lets you work with AWS queues in a similar way to the message-pump pattern used in the latest Azure SDK for Service Bus queues and topics. I’ve posted a simple wrapper class for subscribing to an SQS hub on gist here: A wrapper for the SQS client in the AWS SDK for.NET v2, which uses the message-pump pattern. Here’s the core functionality in the subscribe method: private async void Subscribe() { if (_isListening) { var request = new ReceiveMessageRequest { MaxNumberOfMessages = 10 }; request.QueueUrl = QueueUrl; var result = await _sqsClient.ReceiveMessageAsync(request, _cancellationTokenSource.Token); if (result.Messages.Count > 0) { foreach (var message in result.Messages) { if (_receiveAction != null && message != null) { _receiveAction(message.Body); DeleteMessage(message.ReceiptHandle); } } } } if (_isListening) { Subscribe(); } } which you call with something like this: client.Subscribe(x=>Log.Debug(x.Body)); The async SDK call returns when there is something in the queue, and will run your receive action for every message it gets in the batch (defaults to the maximum size of 10 messages per call). The listener will sit there awaiting messages until you stop it with: client.Unsubscribe(); Internally it has a cancellation token which it sets when you call unsubscribe, which cancels any in-flight call to SQS and stops the pump. The wrapper will also create the queue if it doesn’t exist at runtime. The Ensure() method gets called in the constructor so when you first use the client for a queue (sending or subscribing), it will set itself up: if (!Exists()) { var request = new CreateQueueRequest(); request.QueueName = QueueName; var response = _sqsClient.CreateQueue(request); QueueUrl = response.QueueUrl; } The Exists() check has to do make a call to ListQueues on the SNS client, as it doesn’t provide its own method to check if a queue exists. That call also populates the Amazon Resource Name, the unique identifier for this queue, which will be useful later. To use the wrapper, just instantiate and go: var queueClient = new QueueClient(“ProcessWorkflow”); queueClient.Subscribe(x=>Log.Debug(x.Body)); var message = {}; //etc. queueClient.Send(message);

    Read the article

  • How to suppress error message details to general DNN Users

    - by thames
    I have a DNN site (05.02.03) in test and nearing release into production and I would like to suppress the details of error messages (i.e. Null Reference Exception, and others) to general users (admins can still see the details). Debug is off in the web.config. By suppressing, I mean the only error message I want to display to the general user (all users) is something like "An Exception has occured". I don't want the details of that exception to be displayed to the general user. I still want it logged in greater detail in the Event Viewer. How would I go about doing this? Update: I have "Use Custom Error Messages" checked. Which shows a error message like: A critical error has occurred.[vbCrLf] Object reference not set to an instance of an object. I want just the "A critical error has occured." error message to be displayed to general users. I don't want the "Object referece not set to an instance of an object." to be displayed to general users

    Read the article

  • Display a Text Message During Bootup of Windows 7

    - by Mysticgeek
    Sometimes you might want to leave a text message for a user before they log into a Windows 7 computer. Today we show you a neat trick that allows you to leave a message they can read before logging in. Add a Text Message To add a message, click on Start and enter regedit into the Search box and hit Enter. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Policies\System and double-click on legalnoticecaption. In the Value data field enter in the header you want…for instance your company name or the name of your computer…whatever you want it to be, then click OK. Then double-click on legalnoticetext … And in the Value data field enter in the message you want to display and click OK. Close out of Registry Editor and reboot the computer.   After the machine reboots you’ll see the text message you just created at the Welcome screen.   You can include whatever text message you want to be included for the user to read before they log in. This is a neat trick if you have a company or school and want to show a particular message to the user before they log into the machine. Similar Articles Productive Geek Tips Start Your Computer More Quickly by Delaying the Startup of a Service in VistaCopy Windows Error Messages to the ClipboardHide the Recycle Bin Icon Text on Windows VistaHow To Disable Annoying Blinking Text in FirefoxStupid Geek Tricks: Using the Quick Zoom Feature in Outlook TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Combine MP3 Files Easily QuicklyCode Provides Cheatsheets & Other Programming Stuff Download Free MP3s from Amazon Awe inspiring, inter-galactic theme (Win 7) Case Study – How to Optimize Popular Wordpress Sites Restore Hidden Updates in Windows 7 & Vista

    Read the article

  • Using XSLT for messaging instead of marshalling/unmarshalling Java message objects

    - by Joost van Stuijvenberg
    So far I have been using either handmade or generated (e.g. JAXB) Java objects as 'carriers' for messages in message processing software such as protocol converters. This often leads to tedious programming, such as copying/converting data from one system's message object to an instance of another's system message object. And it sure brings in lots of Java code with getters and setters for each message attribute, validation code, etc. I was wondering whether it would be a good idea to convert one system's XML message into another system's format - or even convert requests into responses from the same system - using XSLT. This would mean I would no longer have to unmarshall XML streams to Java objects, copy/convert data using Java and marshall the resulting message object to another XML stream. Since each message may actually have a purpose I would 'link' the message (and the payload it contains in its properties or XML elements/attributes) to EXSLT functions. This would change my design approach from an imperative to a declarative style. Has anyone done this before and, if so, what are your experiences? Does the reduced amount of Java 'boiler plate' code weigh up to the increased complexity of (E)XSLT?

    Read the article

  • iOS chat application design, sending/relaying the message over to the end user

    - by AyBayBay
    I have a design question. Let us say you were tasked with building a chat application, specifically for iOS (iOS Chat Application). For simplicity let us say you can only chat with one person at a time (no group chat functionality). How then can you achieve sending a message directly to an end user from phone A to phone B? Obviously there is a web service layer with some API calls. One of the API calls available will be startChat(). After starting a chat, when you send a message, you make another async call, let us call it sendMessage() and pass in a string with your message. Once it goes to the web service layer, the message gets stored in a database. Here is where I am currently stuck. After the message gets sent to the web service layer, how do we then achieve sending/relaying the message over to the end user? Should the web server send out a message to the end user and notify them, or should each client call a receiveMessage() method periodically, and if the server side has some info for them it can then respond with that info? Finally, how can we handle the case in which the user you are trying to send a message to is offline? How can we make sure the end user gets the packet when he moves back to an area with signal?

    Read the article

  • Entity communication: Message queue vs Publish/Subscribe vs Signal/Slots

    - by deft_code
    How do game engine entities communicate? Two use cases: How would entity_A send a take-damage message to entity_B? How would entity_A query entity_B's HP? Here's what I've encountered so far: Message queue entity_A creates a take-damage message and posts it to entity_B's message queue. entity_A creates a query-hp message and posts it to entity_B. entity_B in return creates an response-hp message and posts it to entity_A. Publish/Subscribe entity_B subscribes to take-damage messages (possibly with some preemptive filtering so only relevant message are delivered). entity_A produces take-damage message that references entity_B. entity_A subscribes to update-hp messages (possibly filtered). Every frame entity_B broadcasts update-hp messages. Signal/Slots ??? entity_A connects an update-hp slot to entity_B's update-hp signal. Something better? Do I have a correct understanding of how these communication schemes would tie into a game engine's entity system? How do entities in commercial game engines communicate?

    Read the article

  • jQuery override default validation error message display (Css) Popup/Tooltip like

    - by Phill Pafford
    I'm trying to over ride the default error message label with a div instead of a label. I have looked at this post as well and get how to do it but my limitations with CSS are haunting me. How can I display this like some of these examples: Example #1 (Dojo) - Must type invalid input to see error display Example #2 Here is some example code that overrides the error label to a div element $(document).ready(function(){ $("#myForm").validate({ rules: { "elem.1": { required: true, digits: true }, "elem.2": { required: true } }, errorElement: "div" }); }); Now I'm at a loss on the css part but here it is: div.error { position:absolute; margin-top:-21px; margin-left:150px; border:2px solid #C0C097; background-color:#fff; color:white; padding:3px; text-align:left; z-index:1; color:#333333; font:100% arial,helvetica,clean,sans-serif; font-size:15px; font-weight:bold; } UPDATE: Okay I'm using this code now but the image and the placement on the popup is larger than the border, can this be adjusted to be dynamic is height? if (element.attr('type') == 'radio' || element.attr('type') == 'checkbox') { element = element.parent(); offset = element.offset(); error.insertBefore(element) error.addClass('message'); // add a class to the wrapper error.css('position', 'absolute'); error.css('left', offset.left + element.outerWidth()); error.css('top', offset.top - (element.height() / 2)); // Not working for Radio, displays towards the bottom of the element. also need to test with checkbox } else { // Error placement for single elements offset = element.offset(); error.insertBefore(element) error.addClass('message'); // add a class to the wrapper error.css('position', 'absolute'); error.css('left', offset.left + element.outerWidth()); error.css('top', offset.top - (element.height() / 2)); } the css is the same as below (your css code) Html <span> <input type="radio" class="checkbox" value="P" id="radio_P" name="radio_group_name"/> <label for="radio_P">P</label> <input type="radio" class="checkbox" value="S" id="radio_S" name="radio_group_name"/> <label for="radio_S">S</label> </span>

    Read the article

  • Handle Arbitrary Exception, Print Default Exception Message

    - by inspectorG4dget
    I have a program, a part of which executes a loop. During the execution of this loop, there are exceptions. Obviously, I would like my program to run without errors, but for the sake of progress, I would like the program to execute over the entire input and not stop when an exception is thrown. The easiest way to do this would be by implementing and except block. However, when I do this, it excepts all exceptions and continues with the program and I never get to see the exception message (which I need in order to debug). Is there a way to except any arbitrary exception and be able to print out the exception message in the except block?

    Read the article

  • Changing error message for datatype validation?

    - by Matthias
    Hey guys, I've a small question on ASP.NET MVC 2. I'm using Data Annotations on my Presentation Model and its model binder per default. But one step back, I want to do the most elementary thing: validation of the data type. Let's say I have an "int ID" on my model and want to edit the according entity in my view. If I enter something wrong like "foo", then I get a model error back, but the validation message is on English. I want to have this message in other languages, too. How can I do this? I remember that in MVC 1 I've written a custom model binder which checks the data types, but that's not what I want to do (at least not in MVC 2). Thus I hope there is a better way... Thanks, Matthias

    Read the article

  • WPF application which calls an API, which needs a message pump

    - by Griffin
    I have a WPF application that calls an API to operate a device (a scanner). This API is COM based, and internally has a hidden window that the scanner sends messsages too. The intent of the API is to turn those windows messages into COM events. The problem is that the WPF application doesn't have a message pump, and therefore none of the messages are being delivered to the hidden window. Therefore none of the events are fired and it looks like the scanner is not responding. How should I create a message loop in the WPF application that will be able to dispatch messages to the invisible window?

    Read the article

  • Rails override validator message

    - by Anand
    Hi, I have a site thats served in 2 flavours, English and French. Here's some code app/views/user/register.html.erb ----------------- <% form_for .....> <%= f.text_field :first_name %> <% end %> app/models/user.rb ------------------ class User < ActiveRecord::Base validates_presence_of :first_name end Now to display the error message in case if the site is being served in the French version, I have app/config/locales/fr.yml ------------------------- activerecord: errors: messages: empty: "ne peut pas être vide" So if someone does not fill in a first name, the validator takes the name of the field and appends the custom message for empty clause giving "First name ne peut pas être vide" which is incorrect, coz 'First name' in French is 'Prénom', hence it should be "Prénom ne peut pas être vide" Please can someone suggest a way of achieving the desired result.

    Read the article

  • onunload message needed but not when they click internal links

    - by tumtummetjes
    okay i have a question... i need an message script that only will come up when people are really leaving the current webpage so not the current website... so actualli when people are leaving the website entirelly the message will come up, they need to press the ok button to stay at the current page and cancel to leave the entire website.. the script may not run when people are actually stay on the website or when the click on internal links/pages.. does that make sence/? and can it be done? who know such code?

    Read the article

  • cryptic error message: Length of Bind host variable exceeds MaxLength

    - by janetsmith
    Hi, I've encountered a cryptic error message thrown by Sybase IQ server. com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -1001019: Function not supported on varchars longer than 255 Length of Bind host variable exceeds MaxLength , -- (df_Heap.cxx 2145) at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636) at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996) at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204) at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187) at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1642) at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1625) at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:91) at ibs.dao.CM3RM1DAO.updateToTable(CM3RM1DAO.java:197) at ibs.dao.CM3RM1DAO.isXMLProcessed(CM3RM1DAO.java:88) at ibs.xml.parser.XMLParser.parsingXMLIntoBO(XMLParser.java:2125) at ibs.common.util.MainClass.main(MainClass.java:74) We have several columns (DESCRIPTION etc.) which are of type varchar(4000). However I can update them directly without having any error. And, I don't see any code specifying any bind variables, so I have no idea where the message comes from. This is the code (I've modified it a bit): String sql = "UPDATE TABLEX SET " + "COMPANY = ?, CUSTOMER_REFERENCE= ?, " + "STATUS = ?, CONTACT_FIRST_NAME = ?, CONTACT_LAST_NAME = ?, " + "SEVERITY = ?, PRIORITY_CODE = ?, REQUESTEDDATE = ?, " + "CLOSE_TIME = ?, LEAD_TIME = ?, CHANGE_REASON = ?, MODTIME = ? WHERE NUMBER = ?"; stmt = conn.prepareStatement(sql); for loop here { stmt.setString(...); . . stmt.executeUpdate(); } Any help is appreciated

    Read the article

  • Different Linux message queues have the same id?

    - by Halo
    I open a mesage queue in a .c file, and upon success it says the message queue id is 3. While that program is still running, in another terminal I start another program (of another .c file), that creates a new message queue with a different mqd_t. But its id also appears as 3. Is this a problem? server file goes like this: void server(char* req_mq) { struct mq_attr attr; mqd_t mqdes; struct request* msgptr; int n; char *bufptr; int buflen; pid_t apid; //attr.mq_maxmsg = 300; //attr.mq_msgsize = 1024; mqdes = mq_open(req_mq, O_RDWR | O_CREAT, 0666, NULL); if (mqdes == -1) { perror("can not create msg queue\n"); exit(1); } printf("server mq created, mq id = %d\n", (int) mqdes); and the client goes like: void client(char* req_mq, int min, int max, char* dir_path_name, char* outfile) { pid_t pid; /* get the process id */ if ((pid = getpid()) < 0) { perror("unable to get client pid"); } mqd_t mqd, dq; char pfx[50] = DQ_PRFX; char suffix[50]; // sprintf(suffix, "%d", pid); strcat(pfx, suffix); dq = mq_open(pfx, O_RDWR | O_CREAT, 0666, NULL); if (dq == -1) { perror("can not open data queue\n"); exit(1); } printf("data queue created, mq id = %d\n", (int) dq); mqd = mq_open(req_mq, O_RDWR); if (mqd == -1) { perror("can not open msg queue\n"); exit(1); } mqdes and dq seem to share the same id 3.

    Read the article

  • Send C++ Structure to MSMQ Message

    - by Gobalakrishnan
    Hi, I am trying to send the below structure through MSMQ Message typedef struct { char cfiller[7]; short MsgCode; char cfiller1[11]; short MsgLength; char cfiller2[2]; } MESSAGECODE; typedef struct { MESSAGECODE Header; char DealerId[16]; char GroupId[16]; long Token; short Periodicity; double Deposit; double GrossExposureLimit; double NetExposureLimit; double NetSaleExposureLimit; double NetPositionLimit; double TurnoverLimit; double PendingOrdersLimit; double MTMLossLimit; double MaxSingleTransValue; long MaxSingleTransQty; double IMLimit; long NetQuantityLimit; } LIMITUPDATE; void main() { // // create queue // open queue // send message // OleInitialize(NULL); // have to init OLE // // declare some variables // IMSMQQueueInfoPtr qinfo("MSMQ.MSMQQueueInfo"); IMSMQQueuePtr qSend; IMSMQMessagePtr m("MSMQ.MSMQMessage"); LIMITUPDATE l1; l1.Header.MsgCode=26001; l1.Header.MsgLength=150; qinfo->PathName = ".\\private$\\q99"; m->Body = l1; qSend = qinfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); m->Send(qSend); qSend->Close(); } while compiling i am getting the following error. Error 2 error C2664: 'IMSMQMessage::PutBody' : cannot convert parameter 1 from 'LIMITUPDATE' to 'const _variant_t &' c:\temp\msmq\msmq.cpp 58 msmq thank you.

    Read the article

  • MSMQ - Message Queue Abstraction and Pattern

    - by Maxim Gershkovich
    Hi All, Let me define the problem first and why a messagequeue has been chosen. I have a datalayer that will be transactional and EXTREMELY insert heavy and rather then attempt to deal with these issues when they occur I am hoping to implement my application from the ground up with this in mind. I have decided to tackle this problem by using the Microsoft Message Queue and perform inserts as time permits asynchronously. However I quickly ran into a problem. Certain inserts that I perform may need to be recalled (ie: retrieved) immediately (imagine this is for POS system and what happens if you need to recall the last transaction - one that still hasn’t been inserted). The way I decided to tackle this problem is by abstracting the MessageQueue and combining it in my data access layer thereby creating the illusion of a single set of data being returned to the user of the datalayer (I have considered the other issues that occur in such a scenario (ie: essentially dirty reads and such) and have concluded for my purposes I can control these issues). However this is where things get a little nasty... I’ve worked out how to get the messages back and such (trivial enough problem) but where I am stuck is; how do I create a generic (or at least somewhat generic) way of querying my message queue? One where I can minimize the duplication between the SQL queries and MessageQueue queries. I have considered using LINQ (but have very limited understanding of the technology) and have also attempted an implementation with Predicates which so far is pretty smelly. Are there any patterns for such a problem that I can utilize? Am I going about this the wrong way? Does anyone have an of their own ideas about how I can tackle this problem? Does anyone even understand what I am talking about? :-) Any and ALL input would be highly appreciated and seriously considered… Thanks again.

    Read the article

  • Common practice in handling bounce message

    - by foodil
    At now I mainly create a mail account separately (with different domain name [email protected]) and i add this mail as one return path. So the bounce message will only go to that mailbox and i parse the mail message one by one to check the failure receipent and the error code, then i convert the error code to the actual error message. Finally, the error message and the fail receipent's mail are post to my system and let my system user check the bounce information. Is it a common practice? Since i am worry about the mail other from bounce message have sent to my mail box, that would be a disaster if i parse them without filter them out, but how can i filter out between bounce message and normal mail? Thank you for any kind of help.

    Read the article

  • Advice on Python/Django and message queues

    - by Andy Hume
    I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons. Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django project? The rest of my stack is Apache, mod_python, MySQL.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >