messaging

Getting the most recent message in a thread

拜拜、爱过 提交于 2019-12-05 00:07:36
I have a query that gets all the info I need for a messaging system's main page (including unread message count, etc)... but it currently retrieves the original threads message. I would like to augment the below query to grab the most recent message in each thread instead. This query is very close, however my mediocre SQL skills are keeping me from wrapping things up... $messages = array(); $unread_messages_total = 0; $messages_query = " SELECT m.* , COUNT(r.id) AS num_replies , MAX(r.datetime) AS reply_datetime , (m.archived NOT LIKE '%,".$cms_user['id'].",%') AS message_archive , (m.viewed

Internal messaging in Rails

眉间皱痕 提交于 2019-12-04 20:45:43
I'm using this tutorial to get internal messages working on my site: http://www.novawave.net/public/rails_messaging_tutorial.html But, since my latest upgrade to Rails 3, I'm getting this error: NoMethodError in MsgController#sendmsg undefined method `each' for #<String:0xcc8acc0> Application trace: app/models/message.rb:16:in `prepare_copies' app/controllers/msg_controller.rb:140:in `sendmsg' The Message model: class Message < ActiveRecord::Base belongs_to :author, :class_name => "User" has_many :message_copies has_many :recipients, :through => :message_copies before_create :prepare_copies

Flex Messaging Security

本小妞迷上赌 提交于 2019-12-04 19:41:39
I'm trying to create a module for a flex application, and I want to send notifications to clients. I've been looking at the BlazeDS messaging service to push out the notifications to clients, but I want to be able to send certain updates to certain clients. The Flex notification framework doesn't seem to allow this - if we have a field in the message with a value of the user's user id for example, any client could theoretically subscribe to all messages for any given user id, and there's no verification on the server side to make sure that the client that has subscribed is logged in as that

Twilio on cross platform mobile tools (Ionic, React-Native)

流过昼夜 提交于 2019-12-04 19:28:52
I'm looking to build with Twilio's IP Messaging APIs using a cross mobile framework like React Native or Ionic. My question is - is this a sane request? I see that Twilio has a Javascript library that I plan to use. Examples of successes/failures would also help. My overall goal is to build in simple chat rooms cross platform. If anyone else found their way here from a Google search, I recently released the code I developed to implement IP Messaging on React Native for my org. You can check it out at on GitHub: react-native-twilio-ip-messaging . It currently supports iOS with Android still in

Android google cloud messaging sample not working

那年仲夏 提交于 2019-12-04 16:43:06
Im following the tutorial here http://developer.android.com/google/gcm/gs.html in order to setup GCM. Im currently in the process of trying to register the device. However, for some reason, the application always seems to crash at gcm = GoogleCloudMessaging.getInstance(this); The stacktrace seems to point at the following: 06-18 13:42:20.909: I/dalvikvm(11613): Could not find method com.google.android.gms.gcm.GoogleCloudMessaging.getInstance, referenced from method pushNotification.PushNotification$1.run Heres a sample of what I have so far public PushNotification(Context c, Activity activity)

How to select Topic Vs Queue

泄露秘密 提交于 2019-12-04 16:41:14
When we design the application how to select Topic/Queue type implementation. I am aware of, a) If more than one consumer use the message then use Topic b) If only one consumer then use Queue Please provide any more points need to be considered? For example, concurrency, message persistence, load balancing, anything else? Thanks. Rw Chris Aldrich That's not entirely true about if only one Consumer use a Queue. We have a Java EE app where we rate insurance quotes. We have a RatingIn queue and a RatingOut queue. All our clients write to the RatingIn Queue and read from the RatingOut Queue. And

App Engine Messaging System with Message Status - Design Pattern

混江龙づ霸主 提交于 2019-12-04 16:20:33
I'm building a Threaded Messaging System that will be hosted on Google AppEngine I've modeled it after the technique described by Brett Slatkin in Building Scalable, Complex Apps on App Engine class Message(db.Model): sender = db.StringProperty() body = db.TextProperty() class MessageIndex(db.Model): receivers = db.StringListProperty() The issue I'm having to determining the most efficient way to track the message state for a User. For example is a message read , archived , deleted for a particular user. Here are the solution I have come up with so far. I'm using Datastore+ 's

ActiveMQ: starting consumer without broker

旧街凉风 提交于 2019-12-04 14:42:09
I am writing a JMS client that consumes from a Queue. My broker is activemq, if it matters. One requirement is that the client should start even if the broker is down. In that case it should behave as if there where no messages in the Queue, and once the broker is up and messages start coming behave accordingly. The problem is that in my code: connectionFactory = new ActiveMQConnectionFactory(url); Connection connection = connectionFactory.createConnection(); connection.start() If the broker is down, then it gets stuck in connection.start() . While what I would like to have is connection.start

Is there any simulator/tool to generate messages for streaming?

陌路散爱 提交于 2019-12-04 11:28:48
问题 For testing purpose, I need to simulate client for generating 100,000 messages per second and send them to kafka topic. Is there any tool or way that can help me generate these random messages? 回答1: There's a built-in tool for generating dummy load, located in bin/kafka-producer-perf-test.sh (https://github.com/apache/kafka/blob/trunk/bin/kafka-producer-perf-test.sh). You may refer to https://github.com/apache/kafka/blob/trunk/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance

RabbitMQ: How to specify the queue to publish to?

牧云@^-^@ 提交于 2019-12-04 10:49:39
问题 RabbitMQ's Channel#basicConsume method gives us the following arguments: channel.basicConsume(queueName, autoAck, consumerTag, noLocal, exclusive, arguments, callback); Giving us the ability to tell RabbitMQ exactly which queue we want to consume from. But Channel#basicPublish has no such equivalency: channel.basicPublish(exchangeName, routingKey, mandatory, immediateFlag, basicProperties, messageAsBytes); Why can't I specify the queue to publish to here?!? How do I get a Channel publishing