Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Message transmission method and device

A message transmission and message technology, applied in the computer field, can solve the problems that users cannot determine the message mode, change, and cannot dynamically change the message mode, etc., to achieve the effect of increasing robustness, reliability and flexibility

Active Publication Date: 2019-07-09
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF6 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] (1) In the prior art, the message mode must be pre-determined by the user to transmit the message, but in actual use, the user may not be able to determine the message mode;
[0007] (2) In the process of using the message queue in the prior art, the message mode cannot be changed dynamically, for example, it cannot be changed from the point-to-point mode to the publish-subscribe mode

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Message transmission method and device
  • Message transmission method and device
  • Message transmission method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0062] Embodiment two. The consumption identifiers in Embodiment 1 and Embodiment 2 are message-collection_1#ID_1 and message-collection_1#ID_2 respectively. Since the processing process of the message queue and Consumer_1 is the same as step S403 to step S407, only the The process of message queue and Consumer_2.

[0063] Image 6 It is a schematic diagram of realizing the point-to-point mode of the message transmission method according to the embodiment of the present invention. Such as Image 6 As shown, assuming that Consumer_2 connects to the message queue and sends a consumption ID (message-collection_1#ID_1) the same as Consumer_1, the processing process between the message queue and Consumer_2 is as follows:

Embodiment 1

[0065] (1) Consumer_2 connects to the message queue, and then sends message-collection_1#ID_1 to the message queue;

[0066] (2) After the message queue receives message-collection_1#ID_1, it is confirmed by comparison that the storage queue with the same consumption ID and the name of message-collection_1#ID_1 still exists;

[0067] (3) The message queue reads all messages whose message type is message-collection_1 from the memory, and then puts the messages into the storage queue named message-collection_1#ID_1. Assume that three messages are put into the storage queue named message-collection_1#ID_1, namely messages 1, 2 and 3.

[0068] (4) The message queue randomly sends the messages in the storage queue named message-collection_1#ID_1 to one of the consumers corresponding to the storage queue. Wherein, the consumer corresponding to the storage queue refers to a consumer whose consumption ID is the same as the name of the storage queue. For example, send message 1 and m...

Embodiment 3

[0079] Embodiment 3: Assume that Consumer_2 closes the connection with the message queue next, and then re-establishes a connection with the message queue and sends a different consumption ID (message-collection_1#ID_2) from Consumer_1. At this time, the processing process between the message queue and Consumer_2 is as follows:

[0080] (1) Consumer_2 closes the connection with the message queue. Close the application of Consumer_2, and Consumer_2 will automatically disconnect from the message queue.

[0081] (2) After the message queue finds that Consumer_2 closes its connection, it checks all the existing storage queues and finds that the storage queue named message-collection_1#ID_1 is still being used by consumers, and does not perform any processing on the storage queue.

[0082] (3) Consumer_2 reconnects to the message queue, and then sends a consumption ID different from Consumer_1 to the message queue, for example, the sent consumption ID is message-collection_1#ID_2. ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a message transmission method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: receiving at leastone consumption identifier; when it is confirmed that a storage queue corresponding to the consumption identifier exists, obtaining a message of which the type is the same as that of the message, andthen storing the message into the storage queue; and outputting the message in the storage queue. According to the embodiment, the consumption identifier is sent to the message queue, the message queue stores the message into the storage queue constructed according to the consumption identifier, and the message transmission with the consumer is carried out through the storage queue, so that the technical problem that the message mode must be predetermined in the prior art is solved, and the use flexibility of a user is improved.

Description

technical field [0001] The invention relates to the computer field, in particular to a message transmission method and device. Background technique [0002] Java Message Service (Java Message Service, JMS) is a technical specification for message-oriented middleware (message-oriented middleware) in Java EE (Java Platform Enterprise Edition), and the middleware is a message queue. JMS is used to send and receive messages between two applications or in a distributed system to achieve asynchronous message communication. [0003] Currently JMS supports two message modes, one is point-to-point mode, and the other is publish-subscribe mode. The implementation process of the point-to-point mode is: the user creates a queue (Queue) in the message queue; the producer (Producer) connects to the Queue of the message queue, and then sends a message to the Queue; Receive messages. The implementation process of the publish-subscribe mode is: the user creates a topic (Topic) in the mess...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08G06F9/54
CPCH04L67/146G06F9/546G06F9/544H04L67/568
Inventor 程晓明
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products