Worried about what clients are consuming messages on your broker? Implement a MessageAuthorizationPolicy. Add it to your camel-config:
<broker useJmx="true" persistent="false"
xmlns="http://activemq.apache.org/schema/core">
<messageAuthorizationPolicy>
<bean class="org.funnyfarm.security.MessageGuard"
xmlns="http://www.springframework.org/schema/beans"/>
</messageAuthorizationPolicy>
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" />
<transportConnector name="stomp" uri="stomp://localhost:61613"/>
</transportConnectors>
</broker> (more...)
If you’ve got the Apache ActiveMQ C++ CMS library working you’re ready to start durably consuming messages from a topic. If not, follow my instructions to bootstrap your CMS kit. Why would you want to be a durable consumer of messages? Well, you can disconnect at your leisure, come back later and your messages will be waiting for you. Here’s how to do it.
Let’s get the easy bit out of the way first, the message producer, which has to send messages marked as persistent to the topic, to let the broker know to keep them around for durable consumers. Here’s a simple Ruby message producer:
require 'stomp'
client = Stomp::Client.open "stomp://localhost:61613",
{ :headers => {'client-id' => 'rubyclient'} }
client.send('/topic/mqtest.t', "hello from the ruby client!",
'persistent' => true) (more...)
I’ve got an Apache Camel instance running with stomp listening for interesting things to happen and it works just fine from Ruby. But I need to read from a queue using C++ on Windows for GADfly. So I needed to build a C++ client in Visual Studio. To do that you need the following:
- Apache apr
- Apache apr-iconv
- Apache apr-util
- activemq-cpp-library (more…)
I read an interesting post by Jeff Atwood about software developers hating software, along the lines of you’re a coder so you know how much effort it takes to do things in software and you can recognise crap software when you see it. But I think that’s a fairly minor barb in Software’s bum. Usually when a major company writes crap software and that software is secondary to the reason you’re using that company, using Jeff’s example of a digital camera, it’s usually the company that get’s the yah-boo-sucks treatment. (more…)

Raw Rack on Passenger is great for data transfers to a rich client but what if you’re dishing out actual content for a thin client to display? such as an iPhone webapp? (more on that later). Ruby on Rails is a bit too heavyweight for my liking plus I don’t have a database backend it can mess with. So I had a look at Sinatra. It’s a DSL that’s provided by a web micro-framework that lets you easily build REST style “cloud interfaces” (my term). Just what I need for serving iPhone enabled content with iUI. The other good thing about Sinatra is it’s Rack based, which means it can be served from Apache via Passenger. So here’s how to get started with Sinatra on Apache. (more…)
I’ve been finalising the architecture of the Elgg iPhone app I’m working on. It’s split into 3 components:
- i-elgg : the iPhone/iPod Touch App, which acts as a dedicated Elgg client on the mobile device
- i-elgg-s : the server side component that takes REST calls from the device and returns XML content for it to display
- mobile : the Elgg plugin that lets you register your device ID and hook it to your Elgg account. That means you don’t have to use passwords from the device. It also means you can unregister the device if you lose it.

(more…)
If you’re creating an iPhone/iPod Touch app with a lot of hierarchical data, you’ll be displaying that data in table views, i.e. lists. But how do you navigate among the tables holding the data? That’s where UINavigationController comes in.

(more…)
Sometimes you wonder. I added a custom property list to an iPhone app I’m working on and Xcode failed to build, complaining:
CopyPlistFile
...
copyplist (No such file or directory)
/Developer/Library/Xcode ... /copyplist failed with exit code 71
turned out it was a ruby problem of all things. Xcode relying on ruby to build projects? As suggested in the solution, making a symlink from where Xcode thinks ruby is, to my custom install of ruby sorted the problem:
sudo ln -s `which ruby` /usr/bin/ruby
How does the iPhone interact with your application? How does your nice UI get displayed and what does all that gubbins in the code mean? Read on…

(more…)