anchor.diff:              }
           }
   
  -        function filterByQueue() {
  -            var filterQueueText = $("#queueName").val();
  -            if (filterQueueText == "") {
  -                $("#filterQueueName").val('<%=request.getParameter("nameOfQueue")%>');
  +        function filterByDestination() {
  +            var filterDestinationText = $("#destinationName").val();
  +            if (filterDestinationText == "") {
  +                $("#destinationFilter").val('');
               } else {
  -                $("#filterQueueName").val(filterQueueText);
  +                $("#destinationFilter").val(filterDestinationText);
               }
  -            document.getElementById('dummyForm').submit();
  +            document.getElementById('filterByDestinationForm').submit();
           }
   
           $(document).ready(function () {
  
positive.code:         })
      </script>
  
      <%
          boolean allowReRouteAllInDLC = AndesConfigurationManager.readValue(
                      AndesConfiguration.MANAGEMENT_CONSOLE_ALLOW_REREOUTE_ALL_IN_DLC);
  
          AndesAdminServiceStub stub = UIUtils.getAndesAdminServiceStub(config, session, request);
          String nameOfQueue = stub.getDLCQueue().getQueueName();
          String concatenatedParameters = "nameOfQueue=" + nameOfQueue;
          String pageNumberAsStr = request.getParameter("pageNumber");
          int msgCountPerPage = AndesConfigurationManager.readValue(
                  AndesConfiguration.MANAGEMENT_CONSOLE_MESSAGE_BROWSE_PAGE_SIZE);
  
          Map<Integer, Long> pageNumberToMessageIdMap;
          if (null != request.getSession().getAttribute("pageNumberToMessageIdMap")) {
              pageNumberToMessageIdMap = (Map<Integer, Long>) request.getSession().getAttribute("pageNumberToMessageIdMap");
          } else {
              pageNumberToMessageIdMap = new HashMap<Integer, Long>();
          }
  
          int pageNumber = 0;
          int numberOfPages = 1;
          long totalMsgsInQueue;
          long startMessageIdOfPage;
          long nextMessageIdToRead = 0L;
  
          Message[] filteredMsgArray = null;
          if (null != pageNumberAsStr) {
              pageNumber = Integer.parseInt(pageNumberAsStr);
          }
          try {
              // The total number of messages depends on whether the filter was used or not
              if (DLCQueueUtils.isDeadLetterQueue(nameOfQueue)) {
                  totalMsgsInQueue = stub.getTotalMessagesInQueue(nameOfQueue);
              } else {
                  totalMsgsInQueue = stub.getNumberOfMessagesInDLCForQueue(nameOfQueue);
              }
              numberOfPages = (int) Math.ceil(((float) totalMsgsInQueue) / msgCountPerPage);
  
              if (pageNumberToMessageIdMap.size() > 0) {
                  if (0 == pageNumber){
                      nextMessageIdToRead = 0;
                  }
                  else if (null != pageNumberToMessageIdMap.get(pageNumber)) {
                      nextMessageIdToRead = pageNumberToMessageIdMap.get(pageNumber);
                  }
              }
              // The source of the messages depends on whether the filter was used or not
              if (DLCQueueUtils.isDeadLetterQueue(nameOfQueue)) {
                  filteredMsgArray = stub.browseQueue(nameOfQueue, nextMessageIdToRead, msgCountPerPage);
              } else {
                  filteredMsgArray = stub.getMessageInDLCForQueue(nameOfQueue, nextMessageIdToRead, msgCountPerPage);
              }
              if (null != filteredMsgArray && filteredMsgArray.length > 0) {
                  startMessageIdOfPage = filteredMsgArray[0].getAndesMsgMetadataId();
                  pageNumberToMessageIdMap.put(pageNumber, startMessageIdOfPage);
                  nextMessageIdToRead = filteredMsgArray[filteredMsgArray.length - 1].getAndesMsgMetadataId() + 1;
                  pageNumberToMessageIdMap.put((pageNumber + 1), nextMessageIdToRead);
                  request.getSession().setAttribute("pageNumberToMessageIdMap", pageNumberToMessageIdMap);
              }
          } catch (AndesAdminServiceBrokerManagerAdminException e) {
              CarbonUIMessage.sendCarbonUIMessage(e.getFaultMessage().getBrokerManagerAdminException().getErrorMessage(),
                                                  CarbonUIMessage.ERROR, request, e);
          }
  
          // When searched for a queue, the queue name should persist in the text box.
          String previouslySearchedQueueName = StringUtils.EMPTY;
          if (!DLCQueueUtils.isDeadLetterQueue(nameOfQueue)) {
              previouslySearchedQueueName = nameOfQueue;
          }
      %>
      <carbon:breadcrumb
              label="queue.content"
              resourceBundle="org.wso2.carbon.andes.ui.i18n.Resources"
              topPage="false"
  
negative.code:                 </thead>
                  <tbody>
                  <tr>
                      <td class="formRaw leftCol-big">Destination :</td>
                      <td><input type="text" id="destinationName" value="<%= previouslySearchedDestination %>">
                          <input id="searchButton" class="button" type="submit"
                                 onclick="return filterByDestination();" value="Filter">
  
                          <form id="filterByDestinationForm" action="dlc_messages_list.jsp" method="post">
                              <input type="hidden" name="destinationFilter" id="destinationFilter" value=""/>
                          </form>
                      </td>
                  </tr>
  