HMAS Yarra was the second ship to bear that name. She was a Grimsby Class sloop, a tiny ship was lightly armed with only three four inch guns and a three inch gun along with a small compliment of automatic guns. She spent the first years of the war fighting in the Middle East against Italians, Iraqis and Iranians. During the Iraqi revolt she provided covering fire to Gurkhas as they launched an amphibious assault in locally acquired sailing boats. Her 4" shells smashed the Iraqi positions, often smashing through the houses she was firing at. Shortly after the Commonwealth achieved victory in the Middle East the Japanese attacked. HMAS Yarra was recalled to the Pacific.
On the 5th of February 1942 HMAS Yarra was part of a convoy escorting two troop ships to Singapore. The Japanese launched a massive air attack aimed at the two troop transports. Despite HMAS Yarra's barrage of fire the Japanese pilots pressed home the attack, setting both troop ships on fire. The first ship managed to get the flames under control, the second failed, and soon was a raging inferno amidships with the soldiers clustered fore and aft. During the height of the dive bombing attacks HMAS Yarra came alongside, the Japanese planes as well as dropping bombs were strafing the defiant sloop as she put a barrage of fire into the air. At 2000 yards range one Japanese plane was hit by the No.3 gun, receiving the captains praise. After the action the Captain also praised Acting Leading Seaman Ronald Taylor, whom commanded No.2 gun. The AA fire also claimed two probables.
While under this fierce unrelenting air bombardment, the stationary HMAS Yarra also rescued 1804 soldiers off the deck before the flames consumed the ship. The soldiers on the fore deck were taken off by other ships. The transport’s captain and his chief engineer were the last two to be evacuated from the foredeck. Now grossly overloaded the captain of HMAS Yarra ordered everyone who didn't need to stand to sit down. The survivors were then unloaded at Singapore, and were the last troops to arrive in the doomed city.
The ferocity of the gunfire laid down by the HMAS Yarra was such that her magazines were now over half empty.
Over the next few days HMAS Yarra was rushing about providing escorts for damaged ships and convoys. However on 11th of February seven personnel were detached from the ship. These men had served on board HMAS Yarra for up to 2.5 years, and were being returned to Australia. One of these men was the captain, Lieutenant Commander W.H. Harrington. He was replaced by Lieutenant Commander Robert W. Rankin. However there still hadn't been time to refill HMAS Yarra's empty magazines.
Lt.Cdr Rankin
The ship continued her duties until the 27th, when she was to lead a small convoy to Australia to evacuate the ships from the steadily worsening situation as the overpowering Japanese fleet pushed south. In the convoy HMAS Yarra was the most heavily armed ship. The rest of the convoy was made up of a tanker named Francol, the depot ship Anking and the minesweeper MMS.51.

What followed was two days of calm, apart from two incidents. The first excitement was spotting a single plane which couldn't be identified one evening, and then the next morning two lifeboats were sighted. These were attempting to sail for shore. Inside were the exhausted survivors of the Dutch ship Parigi, they had been in the boats for two days since their ship had been sunk.

At dawn of the 4th of March, 1942 the crew were at action stations. This was part of the normal daily routine. Together the crew watched the sun rise in a blaze of colour. They knew that with another day's sail they'd be safe in an Australian port. The men stood down, and the normal watches resumed. Then shortly later the the klaxon started to scream and the ship's company dashed back to their action stations.
The IJN Takao taken from the IJN Atago's deck.
A lookout had sighted the masts of three large warships. These hove over the horizon in the form of the IJN heavy cruisers Atago, Takao and Maya, accompanied by two destroyers. Each of these monsters had ten eight inch guns and armour up to five inches thick, and there was three of them. HMAS Yarra had three four inch guns and no armour.
Immediately Lt. Cdr. Rankin gave two orders. First he ordered the convoy to scatter and make best speed for safety. Next he had his radio room send a sighting report.

Then he turned his ship and charged the three giants.

As she charged forward HMAS Yarra laid smoke to try and cover the retreat of the convoy. The Japanese opened fire, almost instantly destroying Anking. Then HMAS Yarra returned fire, scoring a single hit on one of the cruisers. The Japanese force veered off and gave their full attention to HMAS Yarra. The initial volley that hit HMAS Yarra destroyed her No.1 and No.3 guns, sickbay and engine room. She was also listing heavily, with all her lifeboats smashed.
The other ships were sunk in short order, the tanker spewing flames and smoke all over the place giving a backdrop to events.

Knowing it was hopeless Lt. Cdr. Rankin gave the order to abandon ship moments before a follow up shell from the Japanese hit the bridge killing everyone there. One survivor was a rating who had just began to clamber down the ladder from the bridge when the shell hit, blowing him off the ladder and badly wounding him.
Ls Taylor
The senior surviving officer started to arrange the evacuation, some survivors started to launch Carley floats. At No.2 gun the crew heard the order to abandon ship. Leading Seaman Taylor heard the order, and dismissed his gun crew, stating he would continue to man the gun. Through the smoke he could see the two destroyers closing in on HMAS Yarra. By now her stern was under water. Eyewitnesses saw LS. Taylor’s gun begin to fire. After two or so rounds the gun took a direct hit silencing it forever. It is said that one of LS. Taylors shots hit one of the destroyers.
The last anyone saw of the HMAS Yarra was her sinking hulk being circled by two Japanese destroyers and a massive column of smoke.

34 survivors from HMAS Yarra were on those two Carley floats. Some were from the Dutch ship whom they'd rescued earlier. When the Dutch submarine K11 surfaced to recharge her batteries on the 9th of March, they spotted the survivors. By then wounds and exposure had reduced the survivors to just thirteen.
On the 4th of March 2014 the Australian Government awarded the HMAS Yarra a Unit Citation for Gallantry. Today the Royal Australian Navy has two ships in service linked to this fight, the HMAS Rankin and HMAS Yarra.

Image credits (and a more complete story):