RabbitMQ setExpiration(); property

Hello Friends i want to know about the expriation Property in RabbitMQ. And what happens if I do not set this property. I am new in rabbitMQ please help me.

AMQP.BasicProperties properties = new AMQP.BasicProperties(); properties.setExpiration("432000000");

-------------Problems Reply------------

Read this https://www.rabbitmq.com/ttl.html

A TTL can be specified on a per-message basis, by setting the expiration field in the basic AMQP class when sending a basic.publish.

The value of the expiration field describes the TTL period in milliseconds. The same constraints as for x-message-ttl apply. Since the expiration field must be a string, the broker will (only) accept the string representation of the number.

Suppose you set Expiration time = 1000

If no one consumes the message within 1 second the message will be dropped.

You can handle the "dropped" messages using https://www.rabbitmq.com/dlx.html.

if you don't set the Expiration the message remains to the queue for ever (if there aren't consumers).

EDIT

Added the comment by theMayer

The messages are not dropped until they reach the head of the queue - therefore, if a non-expiring message exists prior to the message in the queue, no messages will self-delete until the non-expiring message is consumed.

read also this post

Category:rabbitmq Views:4 Time:2019-01-12
Tags: rabbitmq

Related post

  • Why is RabbitMQ not persisting messages on a durable queue? 2011-02-18

    I am using RabbitMQ with Django through Celery. I am using the most basic setup: # RabbitMQ connection settings BROKER_HOST = 'localhost' BROKER_PORT = '5672' BROKER_USER = 'guest' BROKER_PASSWORD = 'guest' BROKER_VHOST = '/' I imported a Celery task

  • RabbitMQ vs Socket.io? 2011-07-09

    I'm doing real time live web app development. Browser users should be able to communicate with eachother through a node.js server. One of the user writes a message and all other users will get it. I don't quite get how RabbitMQ works. But from quick

  • Spring and RabbitMQ how to declare and use queues? 2012-01-25

    I am working on a web project that uses Spring and RabbitMQ. This is a basic system with a Master node sending tasks to Slave nodes (using a direct exchange) and Slave nodes responding to the Master using a simple queue. New slaves may come and go at

  • Visual Studio - new "default" property values for inherited controls 2008-08-10

    I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property DropDownItem

  • What can I do about my employer's intellectual property policy? 2008-08-13

    I've just started a new job, and the company's policy is that they own all intellectual property I create - whether I create it on their time or on my own. That means I can't contribute to open source software, since I can't give away their property.

  • How to attach a ChangeEvent handler to an inherited dependency property? 2008-08-15

    How would you attach a propertychanged callback to a property that is inherited? Like such: class A { DependencyProperty prop; } class B : A { //... prop.AddListener(PropertyChangeCallback); } --------------Solutions------------- (edited to remove re

  • How can I refactor HTML markup out of my property files? 2008-08-16

    I've recently inherited a internationalized and text-heavy Struts 1.1 web application. Many of the JSP files look like: <p> <bean:message key="alert" /> </p> and the properties files look like: messages.properties alert=Please updat

  • Error viewing csproj property pages in VisualStudio2005 2008-08-19

    When I goto view the property page for my CSharp test application I get the following error. "An error occurred trying to load the page. COM object that has been seperated from its underlying RCW cannot be used." The only thing that seems to fix it i

  • Detecting an undefined object property 2008-08-26

    What's the best way of checking if an object property in JavaScript is undefined? --------------Solutions------------- Use: if (typeof something === "undefined") { alert("something is undefined"); } If an object variable which have some properties yo

  • How to expose a collection property? 2008-08-29

    Every time I create an object that has a collection property I go back and forth on the best way to do it? public property with a getter that returns a reference to private variable explicit get_ObjList and set_ObjList methods that return and create

  • Filter linq list on property value 2008-09-01

    I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ? Edit: I accepted Konr

  • How to get an array of distinct property values from in memory lists? 2008-09-02

    I have a List of Foo. Foo has a string property named Bar. I'd like to use linq to get a string[] of distinct values for Foo.Bar in List of Foo. How can I do this? --------------Solutions------------- I'd go lambdas... wayyy nicer var bars = Foos.Sel

  • How do you give a C# Auto-Property a default value? 2008-09-02

    How do you give a C# Auto-Property a default value? I either use the constructor, or revert to the old syntax. Using the Constructor: class Person { public Person() { Name = "Default Name"; } public string Name { get; set; } } Using normal property s

  • ActiveX control default property discovery 2008-09-03

    Is it possible to determine which property of an ActiveX control is the default property? For example, what is the default property of the VB6 control CommandButton and how would I found out any other controls default! /EDIT: Without having source to

  • LightWindow & IE7, "Line 444 - object does not support this property or method" 2008-09-03

    I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the object does not support this property or method. Despite finding various postings

  • Best way to use a property to reference a Key-Value pair in a dictionary 2008-09-04

    This is a fairly trivial matter, but I'm curious to hear people's opinions on it. If I have a Dictionary which I'm access through properties, which of these formats would you prefer for the property? /// <summary> /// This class's FirstProperty

  • How can I use Core Animation to interpolate property values over time on my own classes? 2008-09-06

    Specifically, I am looking to use CA on properties of types other than integers and doubles CGRect, CGPoint, CGSize, and CGAffineTransform structures CATransform3D data structures CGColor and CGImage references and in objects other than CALayers or N

  • Property default values using Properties.Settings.Default 2008-09-09

    I am using .Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use: ValuationInput valuationInput = (Valuatio

  • Windows Forms Designer upset by a control with a nullable property 2008-09-11

    I have a "numeric textbox" in C# .NET which is nothing more than a derivation of Textbox, with some added logic to prevent the user entering anything non-numeric. As part of this, I have added a Value property of type double? (or Nullable<double

  • web page cache setexpires 2008-09-11

    Will the code below work if the clock on the server is ahead of the clock on the client? Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1)) EDIT: the reason I ask is on one of our web apps some users are claiming they are seeing the pages ( accou

  • How can I access the backing variable of an auto-implemented property? 2008-09-14

    In the past we declared properties like this: public class MyClass { private int _age; public int Age { get{ return _age; } set{ _age = value; } } } Now we can do: public class MyClass { public int Age {get; set;} } My question is, how can I access t

  • Lazy loading property and session.get problem 2008-09-15

    In Hibernate we have two classes with the following classes with JPA mapping: package com.example.hibernate import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Generat

  • Can you animate a custom dependency property in Silverlight? 2008-09-15

    I might be missing something really obvious. I'm trying to write a custom Panel where the contents are laid out according to a couple of dependency properties (I'm assuming they have to be DPs because I want to be able to animate them.) However, when

  • Performing validation on a databound object after the property has been updated 2008-09-15

    I have a basic form with controls that are databound to an object implementing the INotifyPropertyChanged interface. I would like to add some validation to a couple of properties but dont want to go through implementing IDataErrorInfo for the sake of

  • How do I get rid of "Cannot resolve property key" in fmt:message tags in JSPs in Intellij 2008-09-15

    This one has been bugging me for a while now. Is there a way I can stop Intellj IDEA from reporting missing keys in tags? My messages are not stored in property files so the issue does not apply in my case. I'm using IntelliJ IDEA 7.0.4 -------------

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.174 (s). 11 q(s)