In a large saucepan, brown the onion, garlic and rosemary in the oil. Season with salt and pepper. Add the chickpeas, broth and bay leaf. Bring to a boil. Cover and simmer for 15 minutes. Remove the cover and stir in the pasta. Cook for another 7 minutes or until the pasta is al dente. Add the herbs and cayenne pepper, to taste. Remove and compost the bay leaf. Adjust the seasoning.